Stretchwickster
Programmer
Hi there,
I am using selectedIndex to reset a drop-down box to display its' first element using the code below. In FF it resets the drop-down to correctly display "Select an operation..." (position 0) but in IE7 it sets the drop-down to display "Insert" (position 1).
Incidentally, the HTML used to build the drop-down is as follows:
Does anyone know how to get IE7 to behave itself?
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
I am using selectedIndex to reset a drop-down box to display its' first element using the code below. In FF it resets the drop-down to correctly display "Select an operation..." (position 0) but in IE7 it sets the drop-down to display "Insert" (position 1).
Code:
formElement.selectedIndex = 0;
Incidentally, the HTML used to build the drop-down is as follows:
Code:
<select id="operation">
<option>Select an operation...</option>
<option value="insert">Insert</option>
<option value="edit">Edit</option>
</select>
Does anyone know how to get IE7 to behave itself?
Clive
![Runner_1Revised.gif](http://dev.slydance.com/images/Runner_1Revised.gif)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096