Linked Questions

3 votes
1 answer
4k views

Possible Duplicate: jQuery Set Cursor Position in Text Area When an input with text is focused, the cursor begins at the end of the text on the right side. How can I make the cursor locate at the ...
Don P's user avatar
  • 64.3k
1 vote
1 answer
1k views

Update: I am sorry for not making it clear - i do not mean getting the text, i meant emulate the effect as if the user had double-clicked on a word in the text area. Supposed i have a textarea that ...
meow's user avatar
  • 28.3k
1 vote
1 answer
826 views

I have a textarea that when hovered, I would like the caret to follow the cursor. It would be like if I clicked the textarea every time I moved my mouse. Here is my current js: $("textarea").on("...
yaclive's user avatar
  • 45
0 votes
0 answers
336 views

The code for my TextBoxAreaFor<> text area (for some reason) puts the cursor at the end of the text area and not at the start like a TextBoxFor<> does. How do I get the cursor to be placed at ...
ASPCoder1450's user avatar
  • 1,651
237 votes
11 answers
400k views

Does anybody know how to move the keyboard caret in a textbox to a particular position? For example, if a text-box (e.g. input element, not text-area) has 50 characters in it and I want to position ...
jonhobbs's user avatar
  • 28.2k
58 votes
7 answers
103k views

I'm working on a BBCode editor and here is the code: var txtarea = document.getElementById("editor_area"); function boldText() { var start = txtarea.selectionStart; var end = ...
Bu Saeed's user avatar
  • 1,347
36 votes
4 answers
114k views

I would like to place the cursor in an input field after a specific link is clicked. I'm using this for a small search engine. Imagine an input field: []. Then some links which is adding a string ...
skolind's user avatar
  • 1,754
37 votes
6 answers
65k views

The old version of the question is below, after researching more, I decided to rephrase the question. The problem as before is, I need to focus a contenteditable div without highlighting the text, ...
Mark's user avatar
  • 33.8k
42 votes
5 answers
76k views

when you click on 'Ask question' here in Stackoverflow you see a text "What's your programming question? Be descriptive." i want the same thing and all i need for that is to move my cursor to the ...
ajsie's user avatar
  • 80.1k
20 votes
4 answers
37k views

http://jsfiddle.net/adamadam123/gEEVM/4/ I'm building a chat system that allows users to add emoticons. Just like in the jsfiddler example above I take the current text in the textarea, combine it ...
Adam's user avatar
  • 21.2k
21 votes
1 answer
23k views

I have a textarea and when I click in it I want to move the caret to the last character so Something[caret] function moveCaret(){ // Move caret to the last character } <textarea onclick="...
Adam Halasz's user avatar
  • 58.5k
18 votes
5 answers
25k views

I've found a couple resources for how to place the cursor in a textarea at the end of the text, but I can't sort out a simple way to make it appear at the beginning. I'm prepopulating the textarea ...
Mike Buckbee's user avatar
  • 7,003
18 votes
7 answers
9k views

Note: Due to a work-related change, I can no longer verify the answers posted here. Most likely, I will never be able to accept an answer down below. The information posted here is useful IMO, so I ...
Keale's user avatar
  • 4,013
19 votes
3 answers
54k views

After a lot of search I found the following threads: define cursor position in form input field jQuery Set Cursor Position in Text Area Unfortunately in none of the posts a complete form embed code ...
Mori's user avatar
  • 7,092
7 votes
3 answers
8k views

I am trying to programmatically fire a key event to go left in a text box, but not having any luck. The input element has focus and the cursor is at the end. I'm trying to get the cursor to move left ...
Anurag's user avatar
  • 142k

15 30 50 per page
1
2 3 4 5 6