Microsoft
Software
Hardware
Network
Question : How do I prevent a Submit if input validation fails?
If I'm doing input validation behind a HTML submit button, and the validation fails, how do I prevent the "submit"? Doing my input validation in the click of the submit button, is this the "correct" way to do it?
Thanks.
Answer : How do I prevent a Submit if input validation fails?
suppose validatePage() is your javascript function and it should return true or false.
then in your button onclick event you have to put onclick="return validatePage();"
then if the function returns false then your submit never hits.
Random Solutions
web forms: xForms or javascript forms: which one is the best?
Moved a Dolpin 7 website to a new server and I get an error message.
Do you know a utility in Unix I could use that would compare 2 files (for ex:, files A.txt vs B.txt) and display the differences between the 2 files?
Cropping Photos Without Changing The Aspect Ratio in Fireworks 8
Windows XP slow to shut down or restart
how to avoid echo in 1 on 1 video chat / conference-system with FMS 3,5
Disable "lan settings" button in Internet Explorer
Adobe InDesign CS4 Application Error
High Insert/Update time because of Trigger
Microsoft CRM Product question