beautyfiend
06-30-2009, 12:55 AM
Hi,
I have a list of sites on my page and it should take you to the site you select from the menu. But it is not working at the moment.
Any help much appreciated!
Thanks
In the head-
<script type="text/javascript">
function go_somewhere() {
var URL = document.getElementbyId ("sitelist").value;
window.open(URL);
}
</script>
In the body-
<form id="myform" action="#">
Select a web site to visit:
<select id="sitelist" size=1 onchange="go_somewhere()">
<option value="">Go to....
<option value="http://www.yahoo.com">YAHOO
<option value="http://www.google.com">GOOGLE
<option value="http://www.bbc.com">BBC
<option value="http://www.tfl.com">TFL
</select>
</form>
I have a list of sites on my page and it should take you to the site you select from the menu. But it is not working at the moment.
Any help much appreciated!
Thanks
In the head-
<script type="text/javascript">
function go_somewhere() {
var URL = document.getElementbyId ("sitelist").value;
window.open(URL);
}
</script>
In the body-
<form id="myform" action="#">
Select a web site to visit:
<select id="sitelist" size=1 onchange="go_somewhere()">
<option value="">Go to....
<option value="http://www.yahoo.com">YAHOO
<option value="http://www.google.com">GOOGLE
<option value="http://www.bbc.com">BBC
<option value="http://www.tfl.com">TFL
</select>
</form>