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 charact
I found an easy way to fix this issue, tested in IE and Chrome:
function setCaret(elemId, caret) { var elem = document.getElementById(elemId); elem.setSelectionRange(caret, caret); }
Pass text box id and caret position to this function.