Ok, this might be a really odd problem. I am writing a web application, and I want to change the value of a certain select box:
<select name="type" class="type">
<option value="word">word</option>
<option value="digit">digit</option>
<option value="letter">letter</option>
<option value="single">single character</option>
<option value="space">space</option>
</select>
In my code I have this:
switch ( target ) {
case "d":
$("select").val('digit');
break;
case "w":
$("select").val('word');
break;
case "s":
$("select").val('space');
break;
}
Here is the problem. This code works as expected in all browsers...except for IE. Internet Explorer (8, if you're curious) processes them all correctly except for the $("select").val("digit") part. It just won't change the value for some reason. The javascript parser properly navigates to that case in the switch and all, but it refuses to change the value of the select box for that one case. Anyone have any ideas?