I just noticed something in IE 6 (not sure about other versions). Take the following code:
Option 3 is selected by default. I thought that clicking on the label will simply select the drop-down list, and indeed it does in some of the browsers I tried it on. In IE, not only does it select it, but it resets it to the first element.
Ok, with 3 options, it's no big deal, but when you're selecting, say, a country from a list, it's very inconvenient. Is there any way to overcome this?
Code:
<label for="testList">My List</label>
<select id="testList">
<option>Option 1</option>
<option>Option 2</option>
<option selected="selected">Option 3</option>
</select>
Option 3 is selected by default. I thought that clicking on the label will simply select the drop-down list, and indeed it does in some of the browsers I tried it on. In IE, not only does it select it, but it resets it to the first element.
Ok, with 3 options, it's no big deal, but when you're selecting, say, a country from a list, it's very inconvenient. Is there any way to overcome this?