0

I want to focus cursor to specific line. I'm getting line's number whit this code

taid=document.getElementById(element);
line = taid.value.substr(0, taid.selectionStart).split("\n").length;

then I make some proccess. After that I want to focus to "line" number. How can I do it ?

Thank you.

Ayro
  • 473
  • 2
  • 5
  • 12
  • 1
    You can start your research here, for example: http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/ – Eugene Dec 17 '13 at 21:58
  • Sorry I didn't write ; I'm trying to find a solution without selection range functions – Ayro Dec 17 '13 at 22:11

0 Answers0