verybrightstar
04-10-2003, 04:51 AM
i have this code
function Check()
{
//If is not empty is true
return true
//else
return false
}
</script>
<form action="TestSubmit.asp" method="post" name="f">
<input type = "text" name="TEST3" value = "T1"><br>
<input type = "text" name="TEST4" value = "T2"><br>
<input type="button" onClick="this.form.action='TestSubmit.asp';this.form.submit()" value = "test3">
<input type="button" onClick="this.form.action='TestSubmit1.asp';this.form.submit()" value = "test4">
<input type="button" onClick="this.form.action='http://localhost/cnafinal/ADMIN_TEST.asp?AID=731&SID=8849993935';this.form.submit()" value = "Search">
<input type="button" onClick="this.form.action='http://www.yahoo.com';return Check()" value = "test5" id=button1 name=button1>
</form>
this is only sample piece of code i want to test, how can i validate the form when i click on the button test5, if validations is true then go to the http://www.yahoo.com else
remain intact, can anyone show me an example
function Check()
{
//If is not empty is true
return true
//else
return false
}
</script>
<form action="TestSubmit.asp" method="post" name="f">
<input type = "text" name="TEST3" value = "T1"><br>
<input type = "text" name="TEST4" value = "T2"><br>
<input type="button" onClick="this.form.action='TestSubmit.asp';this.form.submit()" value = "test3">
<input type="button" onClick="this.form.action='TestSubmit1.asp';this.form.submit()" value = "test4">
<input type="button" onClick="this.form.action='http://localhost/cnafinal/ADMIN_TEST.asp?AID=731&SID=8849993935';this.form.submit()" value = "Search">
<input type="button" onClick="this.form.action='http://www.yahoo.com';return Check()" value = "test5" id=button1 name=button1>
</form>
this is only sample piece of code i want to test, how can i validate the form when i click on the button test5, if validations is true then go to the http://www.yahoo.com else
remain intact, can anyone show me an example