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
SQL Substr Order
Trigger destroys previous trigger
How to determine eclipse version?
asp.net SQL Filestream access is denied
Shares unavailable
Hyperlink Pop UP
How to Configure Link aggregation on Cisco 3560G?
UI Design - How to mockup .net application?
How can I send HTML formatted emails to someone who signs up on my site
User has 6GB PST file (archive.pst), how do I break into smaller pieces?