Re: onSubmit and submit()

by "Frank Boumphrey" <bckman(at)>

 Date:  Thu, 11 May 2000 12:37:17 -0400
 To:  "Albert A. Modderkolk" <mdd(at)>,
 References:  tin
  todo: View Thread, Original

you have to reference tthe form ie if it is the first form on your page


It's best though not to put it in line, but to call a seperate function, and
put your code there. you can then do all your checking etc inside the
function and not use the onSubmit funstion.

function submitform()
 var formserror
   // error checking code here
 if (formserror==true)
   alert("there were errors");


----- Original Message -----
From: Albert A. Modderkolk <mdd(at)>
To: <hwg-techniques(at)>
Sent: Thursday, May 11, 2000 4:37 AM
Subject: onSubmit and submit()

> Is it possible that the combination doesn't work?
> I have tried to use onClick="document.form.submit()" and to use the
> onSubmit on the FORM statement to do some checking.  As far as I can
> see onSubmit is then not invoked.
> Tia, Albert

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA