struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Raeburn" <>
Subject RE: Submiting a form through a link
Date Sun, 29 Jun 2003 16:13:17 GMT
Thanks for the clarification. I knew a normal link worked like that but
wasn't sure of the interaction with the form submission.


> -----Original Message-----
> From: Kruse, Matt []
> Sent: June 29, 2003 8:31 AM
> To: 'Struts Users Mailing List '
> Subject: RE: Submiting a form through a link
> ><a href="" onclick="document.forms[0].submit();return false;">Click
> here</a>
> >The above code works for me. Not sure if the return false; has
> >any impact - probably does nothing.
> The return false is definitely important. It tells the browser that, after
> running the commands in the onClick handler, it should NOT go to the href.
> If you return true (default) then the browser will go to the href after
> running the commands.
> In this case, if you aren't returning false, then the form will submit and
> the browser will immediately abandon that request and instead try to go to
> the href URL, making it look like nothing happened.
> Matt

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message