|
-
Jan 28th, 2002, 04:26 PM
#1
JavaScript: get text selection
Hi all
I want to get the currently selected text (anywhere on the page) into a variable. Searching this forum has given me a way to do it in IE4+, but I have two problems:
1) This needs to work on NS6 too, or at least a seperate way for NS6
2) The purpose of the script is that it adds the currently selected text to a text field when the user clicks a button. The problem is that when the user clicks the selection is lost. What can I do?
Thx in advance
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|