You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steven Leija <St...@valtech.com> on 2001/09/04 23:53:07 UTC

onClick Link Submitting

I'm trying to submit a form through a hyperlink, can anyone see what my
error is in my code?
 
<html:link href="" onClick="javascript:form[0].submit();"
styleClass="vfsButton">Submit Changes</html:link>
 
I'm getting an error saying that my form is null or not an object.

Have a good one, 

Steven 

 

Re: onClick Link Submitting

Posted by Erik Hatcher <er...@earthlink.net>.
you probably need to say "document.form[0].submit()"


----- Original Message ----- 
From: "Steven Leija" <St...@valtech.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, September 04, 2001 2:53 PM
Subject: onClick Link Submitting


> I'm trying to submit a form through a hyperlink, can anyone see what my
> error is in my code?
>  
> <html:link href="" onClick="javascript:form[0].submit();"
> styleClass="vfsButton">Submit Changes</html:link>
>  
> I'm getting an error saying that my form is null or not an object.
> 
> Have a good one, 
> 
> Steven 
> 
>  
>