struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristiano Moreira Silva <crisb...@yahoo.com.br>
Subject Re: Submiting a form through a link
Date Sun, 29 Jun 2003 16:14:20 GMT
First of all, thanks for helping me, but I've one
doubt: in the example
below (the one you sent me), you aren't using
<html:link> but <html:hidden>
instead.  Where I put my link reference? Thanks again.

 <html:form action="/path">
     <html:hidden property="action" value="MyAction"/>
 </html:form>

----- Original Message -----
From: "Steve Raeburn" <steve@ninsky.com>
To: "Struts Users Mailing List"
<struts-user@jakarta.apache.org>
Sent: Saturday, June 28, 2003 6:17 PM
Subject: RE: Submiting a form through a link


>   <a href=""
onclick="document.forms[0].submit();return
false;">Click
> here</a>
>   (or the equivalent using Struts <html:link> tag.)
>
>   <html:form action="/path">
>     <html:hidden property="action"
value="MyAction"/>
>   </html:form>
>
> The above code works for me. Not sure if the return
false; has any
impact -
> probably does nothing.
> Do you have more than one form on the page? You
might need to change the
> forms[] index number.
> You can also try using the form name (which is the
same as defined in
> struts-config.xml) e.g.
>
>   document.forms['testForm'].submit()
>
> If that doesn't work then please post more of your
form & link code.
>
> Steve
>
> p.s. Don't forget that if your users don't have
javascript enabled then
they
> won't be able to use this feature of your site. ;-)
>
> > -----Original Message-----
> > From: Cristiano Moreira Silva
[mailto:crisbrsp@yahoo.com.br]
> > Sent: June 28, 2003 12:02 PM
> > To: Struts Users Mailing List
> > Subject: Submiting a form through a link
> >
> >
> > Hello. I'm trying to submit a html:form through a
> > html:link. When I click the link, on the onclick
> > event, I call a javascript function and execute:
> >
> > document.forms[0].submit()
> >
> > Then nothing happens.
> >
> > Can someone send me a simple example (or a URL to
it)
> > of submiting a html:form through html:link?
Thanks.
> >
> >
> >
> > =====
> >
____________________________________________________________
> > Cristiano Moreira Silva
> > Site - http://computologo.vila.bol.com.br
> > E-mail - crisbrsp@yahoocom.br
> > "Tudo posso nAquele que me fortalece." Fp. 4:13
> >
> >
_______________________________________________________________________
> > Yahoo! Mail
> > Mais espaço, mais segurança e gratuito: caixa
postal de 6MB,
> > antivírus, proteção contra spam.
> > http://br.mail.yahoo.com/
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
struts-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
struts-user-help@jakarta.apache.org




=====
____________________________________________________________
Cristiano Moreira Silva
Site - http://computologo.vila.bol.com.br
E-mail - crisbrsp@yahoocom.br
"Tudo posso nAquele que me fortalece." Fp. 4:13

_______________________________________________________________________
Yahoo! Mail
Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, proteção contra
spam.
http://br.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message