gordan
09-01-2003, 12:45 PM
Hi.
I have a text area and would like to add some text to it when I click a button so I put this code:
var txtarea = document.form.text;
txtarea.focus();
txtarea.value+="some text";
the problem is that this adds "some text" on the end of the text in my textarea
I want the "some text" after my current cursor position
could you help me do that :-)
thanks, Gordan
I have a text area and would like to add some text to it when I click a button so I put this code:
var txtarea = document.form.text;
txtarea.focus();
txtarea.value+="some text";
the problem is that this adds "some text" on the end of the text in my textarea
I want the "some text" after my current cursor position
could you help me do that :-)
thanks, Gordan