struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McCormack, Chris" <>
Subject RE: Appending html:option to a html:link
Date Thu, 01 Jul 2004 13:07:10 GMT
Dont think its possilbe unless you use a bit of javascript. 
As its lunchtime I have knocked out a bit of a solution in javascript (not tested).

<script language="javascript">

  var queryString = "?";
  var count = 0;

function appendToUrl(newValue){
	queryString +="&"+count+"="+newValue;


function doLink(link){


<html:select name="VectorInfoForm" property="chartFormat" onChange="appendToUrl(this.options[selectedIndex].text)"

  <html:option value="1">DHTML</html:option>

  <html:option value="2">Java</html:option>


<a href='"javascript:doLink("")'>click meh</a>

-----Original Message-----
From: Chris Roderick []
Sent: 01 July 2004 13:49
Subject: Appending html:option to a html:link



I have a JSP page that has a list of hml:links, each with a map of
attributes appended e.g.:


<html:link href="" name="attributes">




(where attributes is a map).


On the same page, I have a html:select e.g.:


<html:select name="VectorInfoForm" property="chartFormat" size="1">

  <html:option value="1">DHTML </html:option>

  <html:option value="2">Java</html:option>



When a user clicks on the link, I would like to append the currently
selected option from the html:select to the link, without submitting the


Does anybody know if this is possible, and if so - how?


Thank you in advance,



This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.

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

View raw message