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
Http dynamic Compression not work if We using text/html
Trouble with images in Outlook when received from a MAC
Should Sys Admins (Domain Admins) also have user accounts?
are there any inherent issues introducing a server 2008 system into a predominantly 2003 network?
Backup Exec 2010 can not view DAG, Exchange 2010
SCCM 2007 collection by OU not showing all pc's
How to configure Remote SPAN or alternative option on HP Procurve 2626-PWR switch ?
C++ dll in VB
How to Installing SQL-DMO on sql 2008
Fast download/upload, slow surfing