Re: onSubmit and submit()

by =?iso-8859-1?Q?St=E9phane?= Bergeron <stephberg(at)>

 Date:  Thu, 11 May 2000 16:49:18 -0400
 To:  hwg-techniques(at)
 In-Reply-To:  tin
  todo: View Thread, Original
At 10:37 AM 11/05/00 +0200, you wrote:
>Is it possible that the combination doesn't work?
>I have tried to use onClick=3D"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.

It's not invoked because the Submit event is not fired when a form is=20
submitted through JavaScript but only when a submit button is clicked.  As=
others said, you will have to call the form validation function before you=
call the submit() command.


St=E9phane Bergeron

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