This works for me:

<html:link href="#"
onclick="document.courseForm.submit();">Done</html:link>

Put whatever javascript you want in the onclick handler.

Tim Lucia

> -----Original Message-----
> From: Nisith Dash [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 08, 2003 7:51 AM
> To: Struts Users Mailing List
> Subject: Re: how to submit form using <html:link tag
> 
> 
> in case <html:link>  is specified , you have to give either a 
> forward, or a href or a page attribute. onclick will not work 
> here..the error is:
> 
>  Cannot create rewrite URL: java.net.MalformedURLException: 
> You must specify exactly one of "forward", "href",
> 
> how can i specify the forward attribute so that my purpose is 
> achieved.
> 
> ----- Original Message -----
> From: "Tim Lucia" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Monday, December 08, 2003 6:13 PM
> Subject: RE: how to submit form using <html:link tag
> 
> 
> > <html:link ... onclick="x(arg); ..."/>
> >
> > Tim Lucia
> >
> > -----Original Message-----
> > From: Nisith Dash [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 08, 2003 7:28 AM
> > To: Struts Users Mailing List
> > Subject: how to submit form using <html:link tag
> >
> >
> > Hi,
> >
> > Can anyone of you help me with this..i have a hyperlink in 
> my JSP on 
> > clicking which i want to submit an action form with some request 
> > parameters along with the form.Clicking the hyperlink in the JSP 
> > should ideally perform the following task which is done by this 
> > javascript
> > below:
> >
> > function x ( arg1)
> > {
> >  document.ActionFormName.action = 
> > 
> "../../someAction.do?method=subMethodName&newSearch=true&key="
>  + arg1;  
> > document.ActionFormName.submit(); }
> >
> > I have tried using the <html:link href="" </html:link>, <html:link 
> > page="" </html:link>, but though the action is being called, the 
> > Action Form is not being submitted to the action class. I 
> am not quite 
> > sure whether <html:link forward="" </html:link> will help 
> as i don't 
> > know how to use it in the present scenario.
> >
> > Thanks in advance for any suggestion to the above.
> >
> > Nisith
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to