Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wanting enter key not to default to submit data

Status
Not open for further replies.

jofarrell

Programmer
Mar 21, 2001
178
US
I have a time sheet form that allows user to enter past dates and retrieve their old timesheets. The problem occurs is that after the users enter in the two dates and hit return it submits an empty form clearing out all the old data. I do have to allow them to be able to enter blank fields so I cant validate for that. There is a dynamic table that I create with all current projects and that also prevents me from being able to validate a specific field. Any suggestions on how i can change the TAB oder to allow the "Get Previous" to occur on enter as opposed to "Submit"??

Thanks for any help,

Joanne


 
You can change the submit button from type=submit to type=button. Then you can use an onclick after, that submits the form (using formname.submit). Hope this helps
 
Thank you Cirrus9, will save a lot of heart ache for my users if it does :)

Joanne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top