magritton
3/8/2016 - 2:27 PM

This little script gets a value from an html drop down.

This little script gets a value from an html drop down.

<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function showSelected()
{
	var selObj = document.getElementById('selSeaShells');
	
	var selIndex = selObj.selectedIndex;
	var v = selObj.options[selIndex].value;
	var t = selObj.options[selIndex].text;
}
//-->
</script>
</head>
<body>
<select id="selSeaShells">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>
</body>
</html>