Thanks for the clarification. I knew a normal link worked like that but wasn't sure of the interaction with the form submission.
Steve > -----Original Message----- > From: Kruse, Matt [mailto:[EMAIL PROTECTED] > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]