submit question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
When the user click the submit button in myform.asp, then it will
invoke the
javascript to check the form data. I want to know if we need
document.myform.submit(); ?? Because even I comment it out,
could still get the form data.

<script type="text/javascript">
    function checkformdata()
    {    //etc...

<form name="myform" action="formresponse.asp" method="post"
    //controls etc...

<%= Request.Form %>

Re: submit question

Quoted text here. Click to load it

checkformdata() should return false if the validation fails, and true if
it succeeds.  There'll be no need for the document.myform.submit();
then, but your onsubmit should be
 onsubmit="return checkformdata()"

Of course, you should be validating the form on the server, where you
know the environment.

Hywel     I do not eat quiche /

Re: submit question

On Mon, 3 May 2004 15:50:27 +0100, Hywel Jenkins

Quoted text here. Click to load it

Nothing wrong with validating it client side as well, though. For most
users it will save a bit of time and bandwidth.

Mark Parnell

Site Timeline