Hi,
Here's an example on how you can get the selected value via javascript.
Hope it helps.
Regards,
Leif
<html>
<head>
<script language="JavaScript">
function showValue(selObj){
alert(selObj.options[selObj.selectedIndex].value);
}
</script>
</head>
<body>
<form name="myForm">
<select name="sample" size="1" onChange="javascript:showValue(this);">
<option value="One">First</option>
<option value="Two">Second</option>
<option value="Three">Third</option>
</select>
</form>
</body>
</html>
Hi,
One small warning, accessing HTML in the browser is fine if you rendered the HTML yourself. But be careful when you are using our HTMLB libraries. From time to time the HTML changes, or if you switch from Design2002 to Design2003, it could be that the HTML is changed to much and might break your JavaScript code. Just keep this in mind.
The answer from Leif is perfectly correct. Please do not forget the rules of engagement (posted in this forum), and to press the yellow star to give what is owed.
++bcm
Add comment