By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,717 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,717 IT Pros & Developers. It's quick & easy.

insert text at cursor position

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
objectid.SelectedText = txtValue
Thomas wrote:
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


Jul 23 '05 #2

P: n/a
Thomas wrote:
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
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.