Demo has a form when pushed the submit button to submit it, pressing RETURN won't submit the form.
Here is the code for this Example This has a form where you have to push the submit button to submit it, pressing RETURN won't submit the form. Page 1 of Demo copy and paste: Name it "CancelSubmit.htm" <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> </HEAD> <BODY>
<form name=frmTest onSubmit="return SubmitForm(0)" action="target.asp"> <input type=text name=txtBlah> <input type=BUTTON onClick = "SubmitForm(1)" value="Submit"> </form>
<script language=VBScript> function SubmitForm(iOption) if iOption = 0 then SubmitForm = False else frmTest.Submit end if end function </script> </BODY> </HTML> Page 2 of Demo:Copy and Paste code and name the it "Target.asp" <%@ Language=VBScript %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <p> <%=request("cboPrimary")%><br> <%=request("cboSecondary")%> </p> </BODY> </HTML> |