george Posted May 13, 2008 Share Posted May 13, 2008 Someone clicks a button, I display a textarea. The value of the textarea is "P.S. ". I place focus in the textarea when this button is clicked, but I want the text cursor to be after the "P.S. ". How can I place the text cursor where I want? TIA Link to comment Share on other sites More sharing options...
Jesdisciple Posted May 13, 2008 Share Posted May 13, 2008 Here's something; tell us how it goes: http://parentnode.org/javascript/working-w...ursor-position/ Link to comment Share on other sites More sharing options...
jeffman Posted May 13, 2008 Share Posted May 13, 2008 The short answer is NO.Chris, I've recently begun a study of documentRanges and treeWalkers. Very interesting stuff with lots of application to text regions outside of textareas per se. Imagine a web page that you can edit WYSIWYG style just by pointing your cursor and typing on it. Used correctly, it could really simplify wikis and stuff like that. Link to comment Share on other sites More sharing options...
Jesdisciple Posted May 13, 2008 Share Posted May 13, 2008 Huh? Do you mean that the solution explained there doesn't work? You've completely lost me... Link to comment Share on other sites More sharing options...
george Posted May 13, 2008 Author Share Posted May 13, 2008 Bless you guys!!! I found the same solution elsewhere. I saved the page for later reading. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.