• Post Reply Bookmark Topic Watch Topic
  • New Topic

Save selected content of InputTextArea  RSS feed

 
Muneeswaran Balasubramanian
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,

I need to save the selected content in <h:inputTextArea>.Is there any way?
Even small help also makes me clear.
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're talking about highlighting text in an InputTextArea and saving it, you'll need some JavaScript help. The highlighting mechanism isn't part of HTML, so there's no support for that. However, a JavaScript function can be designed to copy the selected text and send it in an AJAX request. Or to set the value of a hidden field that goes down when an Action is fired.
 
Muneeswaran Balasubramanian
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,
Thanks for your reply.
I have found the code which is get the selected text but i can't found the code which is used to send the selected text to the Ajax request.

Can you send the code used to send the selected text to Ajax Request?
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Muneeswaran Balasubramanian wrote:Hi Tim,
Thanks for your reply.
I have found the code which is get the selected text but i can't found the code which is used to send the selected text to the Ajax request.

Can you send the code used to send the selected text to Ajax Request?


I'm afraid I don't have any. But it would depend on what supporting packages handle your AJAX requests The actual selected text itself is just a standard JavaScript-accessible control property.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!