insert text at cursor position

T

Thomas

Hi there,

I'd like to insert a text into a textarea at the current cursor position
when you click on a button, but I only found out how to insert a text at
the end of the textarea. Is it possible to insert text at cursor position
and if it is, how can I do it?


Thanks for any help


Thomas
 
T

Thomas 'PointedEars' Lahn

Thomas said:
I'd like to insert a text into a textarea at the current cursor position
when you click on a button, but I only found out how to insert a text at
the end of the textarea. Is it possible to insert text at cursor position
and if it is, how can I do it?

Google ist your friend. [psf 6.1]

<http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130>

And the Gecko DOM (used by Mozilla/5.0) provides selectionStart
and selectionEnd properties for HTMLTextArea objects.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top