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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form validation - without onSubmit?

Status
Not open for further replies.

Jon99

MIS
Feb 17, 1999
23
US
I have inherited an application that uses embedded perl which I am trying to enhance (not rewrite!). I need to ensure that all form fields have been completed before the form is submitted - If submit is clicked the values in the form are evaluated and (if incomplete) an sql error is received. The form comprises both select and text boxes - therefore onBlur cannot be used on text boxes (?).

Could I have a verify button which evaluates the form and then reveals the submit button if validation is successful? How would I do that (could you point me to a resource if such exists). Any other suggestions?

Thanks, Jon
 
hie
why w/o onsubmit? when u're using <form .. onsubmit=&quot;return validate()&quot;> & in ur validate function returning false if smth is wrong with form fields filling, then ur form wont be submitted, & thus wont be any error message.. am i missing smth? Victor
 
I might well be able to - may well have not been using onSubmit correctly previously! Currently trying to test it out again - thank you for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top