aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to get or set the caret position in text (JavaScript) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to get or set the caret position in text (JavaScript)" Watch "How to get or set the caret position in text (JavaScript)" New topic
Author

How to get or set the caret position in text (JavaScript)

Kevin Tysen
Ranch Hand

Joined: Oct 12, 2005
Posts: 255
In an input (text) or text area, is there a way to get or set the position of the caret? (I've always called it a cursor, but java API calls it a caret. Maybe 'cursor' sounds like something evil.) In java there are methods for it, but I can't seem to find anything in JavaScript.
 
 
subject: How to get or set the caret position in text (JavaScript)
 
Similar Threads
Why JeditorPane inside a JScrollPane start from buttom?
Stopping cursor in position
Controlling Where a JScrollPane Opens
Position cursor at the end in textareas
set the cursor back to top in a TextArea