> -----Original Message----- > From: Andrew Close [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 28, 2004 2:58 PM > To: Struts Users Mailing List > Subject: Re: Why does <html:submit> work differently than <html:link > action="">? > > > ok, my bad. :) > > i tried <html:link forward= /> and <html:link action= /> but not > <html:link href= /> > > next time i'll try 'all' the attributes before posting. ;)
No... just think about what you're doing and understand the technology. The infinite monkey approach sucks. The form is being submitted to wherever the <form says, regardless of method used to submit. So, action and forward are entirely inappropriate to use for the link in this case. They have nothing to do with the what you want to do, which is submit the form using javascript. What was happening, in your case, was the onclick was firing the submit and then you were being sent to the link, and things got confused. Heck you don't even have to use a link for what you want.. you could just as easily use anything that has the onclick event. The link tag just gives you the visual cue that this is a link. > > thanks Jim > > andy > > On Wed, 28 Jul 2004 14:50:26 -0700, Jim Barrows > <[EMAIL PROTECTED]> wrote: > > > > > > > -----Original Message----- > > > From: Andrew Close [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 28, 2004 2:37 PM > > > To: Struts Users Mailing List > > > Subject: Re: Why does <html:submit> work differently than > <html:link > > > action="">? > > > > > > > > > <a href="#" onclick="submitOne();" >Submit the form > with a link</a> > > > > <html:link href="#" onclick="submitOne();">Submit the form > with a link</html:link> > > > > does the same thing. > > > > > > --------------------------------------------------------------------- > 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]