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
setting SMTP server - please see attached file - it is not working
Access Report - Where Condition
Icons and Start menu disappeared from desktop, running Windows 7 Home Edition on a Dell
IE8 or Higher
Mcafee epo 4.5
hp msl 2024 attaching p212 on FreeBSD 8 p3
Publishing Applications - Windows Server 2008
offline server ,active director
login script copy a shortcut to everybody's desktop
modify public folders permissions on SBS 2008