|
-
Aug 15th, 2002, 03:36 AM
#1
Thread Starter
Hyperactive Member
(SORTED, thanx) Cursor location
Is it possible using JS to find the cursor location. I'll explain why and there may be another way.
I've got a textarea and I type say 'hello this is a test, blah blah' and my cursor is postioned just after the word 'is'. I want to be able to click a button and insert some text there or anywhere, where my cursor is located.
Is this possible?
Last edited by parkes; Aug 15th, 2002 at 09:07 AM.
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
Aug 15th, 2002, 09:02 AM
#2
Fanatic Member
yes, it is, but it requires a lot of code. What you want to do is return the position of the caret in the text box rather than the whole mouse position.
http://www.faqts.com/knowledge_base/...d/1052/fid/130
If you are interested you can get the mouse position too.
http://getelementbyid.com/tutorials/...se/index.shtml
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|