'how to get strut <html:select> value in java script in jsp
i want countryid value in java script
<html:select property="countryid" onchange="retrieveURL();">
<html:option value="-1">SELECT</html:option>
<html:options collection="countryList" property="countryid" labelProperty="countryname" />
</html:select>
can any one help
Solution 1:[1]
Consider your form called uploadForm. In your Javascript, you will do
var select = document.uploadForm.countryid;
var value = select.options[select.selectIndex].value;
I hope this helps.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Buhake Sindi |
