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 query on a financial reporting table
how to make an MsAccess form resolution independent?
Script to email newly created computers. Need to add groups & users accounts also.
What can be done with huge files that cannot be defragmented?
Google Earth - large cache file - dbcache.dat
VB equation is slightly off
Windows 2008 Domain Controller Unavailable (but working)
Using log4j, how do I log to a file in a directory
SSRS 2008 ReportViewer1 control not maximized
Batch Script - Duplicate then rename directory