Well, filling the href parameter to tell that it should read javascript, you
can use the below alternative.

<a href="javascript://" onclick="document.forms[0].submit();">

F.


----- Original Message -----
From: "Kruse, Matt" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List '" <[EMAIL PROTECTED]>
Sent: Sunday, June 29, 2003 6:31 PM
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to