I have this small problem with text boxes in IE. Generally when you tab across text boxes the entered text(if any) is highlighted and on typing something directly it is overwritten. I want to somehow disable this highlighting so that the user can enter text without overwriting the existing text. This works with input type = password but not input type=text.
Well, unfortunantly, this solution will be browser dependant. This events the element that gets focus receives in Mozilla: 1. If you move there using "TAB": 2. If you move there using mouse click: 3. If you use a mouse to select part of text on unfocused element:
Now, in IE element receives: 1. If you move there using "TAB": 2. If you move there using mouse click:
Also, in Mozilla the actual select seems to happend after onselect occurs, so we need to use setTimeout to drop it. So, if you want to cover those 2, here is a code example (you will need to remove some debuging code):
Joined: Feb 02, 2006
Thanks a lot for all the help...works like a charm...