I need to adjust the CSS class of a dropdownlist when it is focused on, in order to change its background color.
However, in IE7, when the dropdownlist is clicked, the CSS class changes but the options list does not appear until the dropdownlist is clicked again. This issue does not occur in Firefox.
I came across advice suggesting the use of the onfocusin event as well:
However, this did not resolve the problem.
The onfocus event is added to the dropdownlist in the backend code:
ddl.Attributes.Add("onfocus", "setCssClass();");
The javascript function used to set the class is:
ddl.className = "Class1";
If anyone has insights on this issue, please assist!