Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not getting the value of textarea in next jsp page

 
dhaval thakor
Ranch Hand
Posts: 53
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here i have given form , where i am trying to forward value of textarea to next jsp page and i am getting it using request.getParameter("Message").toString();
but i am getting only space.

please tell me what can be the issue for that..?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64845
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not be submitting a form tot a JSP, and there should be no Java code in a modern JSP.

Submit the form to a servlet, not a JSP.

Within the servlet you should be able to obtain the submitted element by its name.
 
dhaval thakor
Ranch Hand
Posts: 53
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for answer Bear Bibeault.

Actually i was trying to retrieve value of extarea of YUI.

and that code i am posting below.


I have tried below solution to retrieve value
YUI has special function to retrieve its html code into textarea.
I didn't use it before. Now i have used it now.
I have inserted code for solution
where i am trying fatch value of text area and passes it to hidden field.




Thanks for the response..

Thanks you coderanch.
 
Rob Crowther
author
Ranch Hand
Posts: 297
5
Android Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're doing getElementByid but you don't have an element with an ID of Message. You do have an element with an ID of msgpost.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64845
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also do not name anything "submit"! You have broken the form by doing so!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic