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
About direct X / Open GL issue
Joomla CiviCRM problem
Repeated Windows Update
Get active workbook name C#
The Microsoft Office Access database engine cannot find a record in the table with key matching field(s)
SQL Scripts in a .bat file?
How do I fix a calculation problem in Microsoft Visual 2008?
jquery click functions not getting attached to dynamic div elements (a href)
HTTP Error 404.3 on IIS 7.0
How can I convert a custom control that calls User32 and Shell32 to work on Mono?