Weird problem with dropdown onclick event in IE 7.
Hi,
I am facing very weird problem with dropdown onclick event in IE 7.0 for ASP 3.0 application
When page gets load, I fill a dropdown control from the database & while doing so I set the Text of the very 1st option as 'Use Drop Down to select value' (followed by values from the database)
Eg:
<option name=' ' value=''>Use Drop Down or 'Find' to locate a skill</option>
I am calling the following function on onClick event of that dropdown & that function (ChangeText) empties the text of the 1st Option (i.e. it removes the 'Use Drop Down or 'Find' to locate a skill' text)
Eg.
<select Name='Select1' id='Test1' onClick='ChangeText(this)' ...
function ChangeText(list)
{
list.options[0].text=""
}
After implementing the above logic when user clicks on the dropdown button (to select a value), the data dropdown menu disappears immediately, not allowing user to select any value. The dropdown data menu should stay open and allow user to select a value.
This works absolutely fine in other dropdowns where onClick event has not been implemented.
Also note that there is no such problem in IE 6.0. Donno why its behaving such a way with onClick event in IE 7.0.
I have implemented the above logic in my ASP 3.0 app
Thanx in advance
Regards,
Vipul Mehta
Vipul Mehta
Sr. Software Developer
Accenture Services Pvt Ltd
|