145
rated 0 times
[
147]
[
2]
/ answers: 1 / hits: 16829
/ 14 Years ago, tue, july 20, 2010, 12:00:00
I have an html textarea that will be updated periodically via javascript.
when I do this:
$(#textarea).val(new_val);
The cursor moves to the end of the text.
I would like to update the text without changing the cursor position. Also, if the user has a range of text selected, the highlight should be preserved.
More From » html