Title: RE: How to append select option to html:link

Hi cdroderick,

I think this is piece of code which will fulfill ur requirement..

<script language='_javascript_'>
function testLink(actionName)
{
Var selectValue =document.fm.chartFormat.options[document.fm.chartFormat.selectedIndex].value;

document.fm.action=""
document.fm.submit();

}
</script>


<html:form name=fm>

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

<html:select name="VectorInfoForm" property="chartFormat" size="1">
  <html:option value="1">DHTML (IE Only)</html:option>
  <html:option value="2">Java</html:option>                       
</html:select>

</html:form>


sahu


-----Original Message-----
From: cdroderick [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 25, 2004 3:16 PM
To: [EMAIL PROTECTED]
Subject: How to append select option to html:link

Hello,

I have a JSP with a list of dynamically generated html:links.  Each
link has a map of attributes appended e.g.:

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

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

<html:select name="VectorInfoForm" property="chartFormat" size="1">
  <html:option value="1">DHTML (IE Only)</html:option>
  <html:option value="2">Java</html:option>                       
</html:select>

I would like that when a link is clicked, not only the map of
attributes is appended, but also the current value of the select
option. I know how to get the current option value with _javascript_
e.g.:

document.forms[0].chartFormat.options[document.forms
[0].chartFormat.selectedIndex].value

but I don't know how to append this to link.

Does anybody know how to do this without re-submitting the form?

Thanks in advance.


---------------------------------------------------------------------
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]

Reply via email to