OK, I am confused. I asked this question because the JavaScript
tutorial on w3schools says that onSubmit will cancel the submission if
the code it executes returns a value false. To test, I did this and yet
the page got posted to the target page successfully.
<HTML>
<SCRIPT>
function decision()
{
return false;
}
</SCRIPT>
<FORM name="frm" action="http://localhost/JavaScript/target.asp"
method="POST">
<INPUT type="text" name="txtWhatever" size="30" />
<INPUT type="submit" onSubmit="return decision()"/>
</FORM>
</HTML>
On target.asp, I just do:
<HTML>
<% Response.Write(Request.Form("txtWhatever")) %>
</HTML>
|