How to cancel a form's submit event
Posted on 2001-06-06
if myForm.txtSINo.value = 1 then
<some problem here to cancel the submit event>
<form name=frmSI action=chk_rec.asp method=post onSubmit="checking(frmSI)">
<font class="normal">SI: <input class="enable_textbox" type=text" name="txtSINo" maxlength="6">
<input class="button_side" type="submit" name="btnSubmit" value="Next">
This is the code that I used in my script. When the user click on the next button, I would like to perform some checking in the function called "checking". If the value of txtSINO is not 1 then I want to cancel the submit event (so that the form will not continue to submit to the ASP page in the server).