
Originally Posted by
tech_support
Change this:
Code:
document.getElementById("drpdwn").value;
to this:
Code:
document.getElementById('drpdwn').options[document.getElementById('drpdwn').selectedIndex].value
It is not necessary IE7 and IE6 definitely supports the following method:
Code:
document.getElementById("drpdwn").value;
I've tried the code and it is working correctly for me in both IE7 and IE6, find the pasted code below:
Code:
<form>
<select name="select" id="drpdwn" onchange="Choice();">
<option>--PLEASE CHOOSE ONE OF THE TWO POSSIBLE OPTIONS--</option>
<option value="HTML1.html">OPTION 1</option>
<option value="HTML2.html">OPTION 2 </option>
</select>
</form>
<script>
function Choice(){
//alert(document.getElementById('drpdwn').value);
window.location = document.getElementById('drpdwn').value;
}
</script>

Originally Posted by
mad
The reason is the windows.location in the javascript.
I tried windows.location.href and it doesn't work either.
In both references you've used windows.location and windows.location.href but it is window.location and window.location.href
Bookmarks