HI SoftwareMaker,
You dont really have to use input button, you can use submit button to do your validation.
this is how i do my validation on most forms
Hope this helpsCode:<html> <head> <script> function validate() { if (some condition) { alert(msg); return false; } if (another condition) { alert (msg); return false; return true; //if the functions returns true then the form will //be submited otherwise the form wont be submited } </script> <body> <form action="submit.asp" onsubmit="return validate()"> </form> </body> </html>
Danial





Reply With Quote