I have always sucked at javascript I have read multiple books and studied online but on some things I just cannot get them to work. Anyway, I use a simple javascript function that selects all of the text in a textfield when I hover it:
<input type="text" onMouseOver="this.focus();this.select()">
how do I undo that action once the cursor is no longer over that field? This is important since I bought a new BlackBerry Bold 9930 and hate the internet browsing, but with javascript I am making things easier like highlighting all text in a field by just hovering over it. So I just need the code that unselects all of the text once I move away from that field since in the Blackberry browser it wants to stay stuck in that field highlighting the text unless I click somewhere else. Thanks.
http://jsfiddle.net/meQek/
it’s kind of an odd way but logical when you think about it. If you highlight it all on mouseenter, the selectionEnd is at the end… so just make the selectionStart at the same position on mouseleave.
EDIT:
actually… blur works just fine 😛
http://jsfiddle.net/meQek/1