Hi. The example below uses a class to hold various URLs.
I'm using a Class as I have multiple option values with duplicate data The WC3 validator does not like ID's with
duplicate data.
My question is, how do I alert the URL of the chosen option?
Any ideas?
I'm using a Class as I have multiple option values with duplicate data The WC3 validator does not like ID's with
duplicate data.
My question is, how do I alert the URL of the chosen option?
Code:
<html>
<head>
<script type="text/javascript">
function go()
{
alert(document.getElementById("menu").class;
}
</script>
</head>
<body>
<form>
<select id="menu" onchange="go()">
<option>--Select a page--</option>
<option class="[URL unfurl="true"]http://www.bing.com">Bing</option>[/URL]
<option class="[URL unfurl="true"]http://www.microsoft.com">Microsoft</option>[/URL]
<option class="[URL unfurl="true"]http://www.altavista.com">AltaVista</option>[/URL]
<option class="[URL unfurl="true"]http://www.bing.com">Bing</option>[/URL]
</select>
</form>
</body>
</html>
Any ideas?