struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Stone <>
Subject Re: <html:link> instead of <html:submit>
Date Fri, 13 Feb 2004 13:49:03 GMT
Paul McCulloch wrote:
> I don't beleve this will submit the values in the form's input fields. I've
> achieved this functionality by having links which use javascript to set the
> dispatch form value & call submit.
> Paul

I was going to say the same thing.

Try something like
	<a href="/page?queryString" onclick="document.formName.submit();return 
false;" onkeypress="return this.onclick()">Submit Query</a>

The HREF provides a non-Javascript browser a backup (section 508, WAI, 
etc). The "return false;" of onclick ensures that the event replaces the 
default behavior of the link, and the onkeypress further meets section 
508, where mouse use is limited or not possible (think non-sighted 
users). I suppose one can do this in a Struts specific manner if desired 
of course. But I'm a Struts newbie.

If anyone wishes to provide the "Struts-way," please do so.


>>-----Original Message-----
>>From: Gopalakrishnan, Jayesh []
>>Sent: 12 February 2004 19:45
>>To: Struts Users Mailing List
>>Subject: RE: <html:link> instead of <html:submit>
>>Wouldn't query parameters work here?
>>How abt using <html:link page="/youraction?buttonName=testButton" />
>>-----Original Message-----
>>From: Dieter Mummenschanz []
>>Sent: Thursday, February 12, 2004 12:46 PM
>>Subject: <html:link> instead of <html:submit>
>>I have a jsp page with some <html:submit> buttons. The 
>>servlet identifies
>>the klicked button by invoking httpservletrequest.getParameter("...").
>>Is there a way to use links in my .jsp page using <html:link> 
>>instead of
>>Thx for any help,

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

View raw message