this is my HTML code
<select name="chart" id="cart" onchange="GetVal(this)">
<option value="tree" selected>collapsiable tree</option> <option value="sun">sunburst</option><option value="icicle">icicle</option> </select>
this is the javascript code used for page navigation
function GetVal(val) {
var selectedText = val.options[val.selectedIndex].innerHTML;
var selectedValue = val.value;
if(selectedValue=="sun")window.location.href = "sun.html";
if(selectedValue=="icicle")window.location.href = "icicle.html";
}
but this is not working when I use javascript...how do I change the url...plz help