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
PHP Loading Bar
Cannot open help files in WIN7
Clearing a submit form once submitted
Include C++ header files in .Net Application
I am having trouble opening a .bat file in a VBA Excel Macro
Exchange 2010 & GroupWIse 7
Compare Internet Explorer (IE6) Security Settings
Websphere deployment logs
How to access a folder on an SERVER when the domain server is offline ?
How to change the from field on auto-generated SharePoint emails.