I have tried everything, and it just dont work. temp = document.getElementById("test").value; document.getElementById("test").value = ""; document.getElementById("test").value = temp; document.getElementById("test").focus(); HTML: I tried that code. Seems like it move the cursor to the end of textbox, but I couldn't see the cursor blinking and moving to the end of the textbox.
Have you tried this? http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area
yes. but it didn't work if we have long text. see here http://odihost.com/test.php setCaretToPos(document.getElementById("YOURINPUT1"), 35); wont work, but setCaretToPos(document.getElementById("YOURINPUT1"), 4); will work