Maybe you've changed some name but forgot to update it elsewhere.
For your case in which submit method is directly inside the event
handler,
you could have written
onClick=3D"this.form.submit();"
which would avoid many problems due to renaming.
> -----Message d'origine-----
> De : anne.do@c... [mailto:anne.do@c...]
> Envoy=C3=A9 : jeudi 20 f=C3=A9vrier 2003 16:09
> =C3=80 : javascript
> Objet : [javascript] RE: Help with OnClick event to submit a form
>
>
> Don't know what the problem was but it's working now. That
> was odd. The
> original error was 'Object doesn't support this property or
> method'. But
> it's not giving that error anymore. Thanks!
>
> Anne
>
>
> -----Original Message-----
> From: Robert Nyman [mailto:robert.nyman@c...]
> Sent: Thursday, February 20, 2003 9:54 AM
> To: javascript
> Subject: [javascript] RE: Help with OnClick event to submit a form
>
> What kind of errors do you get?
>
> /Robert
>
>
> -----Original Message-----
> From: anne.do@c... [mailto:anne.do@c...]
> Sent: den 20 februari 2003 15:55
> To: javascript
> Subject: [javascript] Help with OnClick event to submit a form
>
>
> I have a form which I want to submit when a user clicks on a radio
> button. I am using the onClick event but it's giving me
> errors. Please
>
> help so that when a user chooses either the yes or no button it will
> trigger the form to submit to the action page. Do I have to use an
> input
> type=3D"button" for this to work?
>
> ----------------------
> <Form action=3D"NextPage.htm" name=3D"AnswerForm" method=3D"post">
> Do you want to continue?
>
> <input type=3D"radio" name=3D"Question" value=3D"1"
> onClick=3D"document.AnswerForm.submit();">YES
>
> <input type=3D"radio" name=3D"Question" value=3D"2"
> onClick=3D"document.AnswerForm.submit();">NO
>
> </Form>
>