Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insert text from servlet to textarea of html

 
Pradeep allada
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a form page having two textarea fields(t1,t2), one for input(t1) and the other for output(t2) and a button.
I want to know when I click the button I need output of second textarea(t2) from servlet page.
how to do that?
please help me....
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know when I click the button I need output of second textarea(t2) from servlet page. how to do that?

You may need to utilize AJAX here. Send the request to the servlet on the click event through AJAX call, populate the textarea with the response. AJAX Tutorial, if you are not familiar with it.
 
Pradeep allada
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Vijitha Kumara for your answer
but I don't know about ajax. Is there any other way to handle this?
 
bhanu chowdary
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep,
whatever you want to display, set it in the most appropriate scope variable and use it in your JSP to display the value in the other textarea.
 
Pradeep allada
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bhanu chowdary wrote:
appropriate scope variable and use it in your JSP to display the value in the other textarea.


thank you bhanu chowdary it is now working...
 
bhanu chowdary
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic