Posted on 2007-10-01
My problem is, when there is text in the textbox the text gets highlighted when the blur of the dropdown occurs. When I set the focus back to the dropdown (in script) the text in the textbox stays highlighted.
I realize if the dropdown list was a textbox then I could use the textbox.select(). However, since it is a dropdown this function is not available. I've tried everything I can think of with no avail... Any help would be MUCH appriciated!!!
Here is some sample code - this is not the actual code but you'll get the gist:
if (document.getElementById("dropdown1").value == "A")
<asp:dropdownlist id="dropdown1" runat=server onBlur="EvaluateMe()">
<asp:ListItem text="A" value="A"></asp:ListItem>
<asp:ListItem text="B" value="B"></asp:ListItem>
<asp:textbox id="textbox1" runat=server text="textbox text"></asp:textbox>