I have a dropdown box that when the onChange event is triggered it goes into the following javascript function:
var e_select = document.getElementById("hotel");
var hotel = new String(e_select.options[e_select.selectedIndex].value);
var strURL = new String ("border2.asp?page_id=51&h=" + hotel);
//var strURL = new String ("border2.asp?page_id=51&h=200");
result = location.href= strURL;
return result;
It essentially finds the value of the selected dropdown option , refreshes the page and passes that value to itself. This works fine in IE (as it usually accepts shotty code more often) but in Firefox and Netscape nothing happens. However if I comment out the first three lines and uncomment the 4th everything does work. So essentially I have to assume that something is wrong with the first three lines in my function and I need another pair of eyes to try and spot the problem. I hope that made sense and thanks for any and all help in advance.
-Rory
var e_select = document.getElementById("hotel");
var hotel = new String(e_select.options[e_select.selectedIndex].value);
var strURL = new String ("border2.asp?page_id=51&h=" + hotel);
//var strURL = new String ("border2.asp?page_id=51&h=200");
result = location.href= strURL;
return result;
It essentially finds the value of the selected dropdown option , refreshes the page and passes that value to itself. This works fine in IE (as it usually accepts shotty code more often) but in Firefox and Netscape nothing happens. However if I comment out the first three lines and uncomment the 4th everything does work. So essentially I have to assume that something is wrong with the first three lines in my function and I need another pair of eyes to try and spot the problem. I hope that made sense and thanks for any and all help in advance.
-Rory