I am making a "text editor" of HTML (doesn't matter why) and I have button that add HTML code to the end of the text field (in a form). I know that there is the "select" command that selects a part in the text field (or all of it), is there an opposite command that find out what part is selected? Also, is there a command that can find where is the little stick that shows you where the new text you'll write will be? (in a text field, the user sees... Maybe it is also called a cursor? I dunno!)
Hi, The 'stick' is a 'caret' I don't know if these will be of any use (I've never had to do this) but try Javascript : Getting and Setting Caret Position in Textarea =========================================== http://blog.vishalon.net/Post/57.aspx and Cross Browser selectionStart/selectionEnd =============================== http://www.teria.com/~koseki/memo/xbselection/ Hope this helps!