I need a help in this code: i want when I select from the select list go direct to site that I choose.
for example when I choose yahoo i have to go directly to yahoo website.
Can any one help me plz.
<script>
function setList(theList) {
switch (theList) {
case 1 : {
document.theForm.mySelect.options[0].value="yahoo";
document.theForm.mySelect.options[1].value="msn";
document.theForm.mySelect.options[2].value="skype";
document.theForm.mySelect.options[3].value="";
document.theForm.mySelect.options[4].value="";
document.theForm.mySelect.options[5].value="";
document.theForm.mySelect.options[6].value="";
document.theForm.mySelect.options[7].value="";
document.theForm.mySelect.options[0].selected=true;
document.theForm.radioButton[0].checked=true;
break;
}
case 2 : {
document.theForm.mySelect.options[0].value="elaph";
document.theForm.mySelect.options[1].value="cnn";
document.theForm.mySelect.options[2].value="bbc";
document.theForm.mySelect.options[3].value="";
document.theForm.mySelect.options[4].value="";
document.theForm.mySelect.options[5].value="";
document.theForm.mySelect.options[6].value="";
document.theForm.mySelect.options[7].value="";
document.theForm.mySelect.options[0].selected=true;
document.theForm.radioButton[1].checked=true;
break;
}
}
setOptionText();
}
function setOptionText() {
document.theForm.mySelect.options[0].text=document.theForm.mySelect.options[0].value;
document.theForm.mySelect.options[1].text=document.theForm.mySelect.options[1].value;
document.theForm.mySelect.options[2].text=document.theForm.mySelect.options[2].value;
document.theForm.mySelect.options[3].text=document.theForm.mySelect.options[3].value;
document.theForm.mySelect.options[4].text=document.theForm.mySelect.options[4].value;
document.theForm.mySelect.options[5].text=document.theForm.mySelect.options[5].value;
document.theForm.mySelect.options[6].text=document.theForm.mySelect.options[6].value;
document.theForm.mySelect.options[7].text=document.theForm.mySelect.options[7].value;
}
</script>
</head>
<body onload="setList(1)">
<form name="theForm" onreset="setList(1)">
Sites<br>
<input checked name="radioButton" type="radio" value="Brgy" onclick="setList(1)">messanger
<input name="radioButton" type="radio" value="MuniCity" onclick="setList(2)">news
<hr size="1">
</select>
<select name="mySelect" style="width:250px;">
<option value="yahoo" selected>yahoo</option>
<option value="msn">msn</option>
<option value="skype">skype</option>
<option value="elaph">elaph</option>
<option value="cnn">cnn</option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
</select>
<br><br>
</form>



