Page 1 of 1

javascrpit

Posted: Thu Oct 23, 2003 1:36 pm
by penguinboy
Well.. I had an idea while I was trying to fall asleep last night...
Anyway.. I don't know much about javascrpit,
but I was wondering if there was anyway that
I could tell what text is highlighted on the screen.

For instance, lets say after I make this post.
I highlight all the text from the post on the screen.
Then I click a button... like .. [quote] or something.

Can javascript tell what text I have highlighted?

Posted: Thu Oct 23, 2003 3:19 pm
by microthick
This script might prove to be of some help.

http://javascript.internet.com/page-det ... -text.html

Posted: Thu Oct 23, 2003 3:32 pm
by Unipus
Huh. Surprisingly, that script works in Mozilla/Firebird as well as IE! Cool.

Posted: Thu Oct 23, 2003 3:35 pm
by penguinboy
Yeah! Thats awsome thanks alot microthick.