View Single Post
  #1 (permalink)  
Old September 7th, 2007, 04:38 AM
tovipul21 tovipul21 is offline
Registered User
Join Date: Oct 2004
Location: Mumbai, Maharashtra, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tovipul21
Default Weird problem with dropdown onclick event in IE 7.

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)
<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)

<select Name='Select1' id='Test1' onClick='ChangeText(this)' ...

function ChangeText(list)

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

Vipul Mehta

Vipul Mehta
Sr. Software Developer
Accenture Services Pvt Ltd