Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting selected text.. urgent

 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can we get selected text in a textarea input box? For ex: if user selects "li" in "California", can we get the selected text "li"?
Thaks in advance,
Santhosh.
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this article that I found:
http://www.webreference.com/js/column12/events.html
It doesn't appear that you can get the text that is selected, you can only tell that some text was selected and have a function react then. I thought this was possible but when I saw this article, I am guessing it is not now.
Bill
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill, thanks a lot for your reply. I'll try to do with the applet.
Santhosh.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!