aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes not getting the value of textarea in next jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "not getting the value of textarea in next jsp page" Watch "not getting the value of textarea in next jsp page" New topic
Author

not getting the value of textarea in next jsp page

dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53

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

Joined: Jan 10, 2002
Posts: 61610
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53

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

Joined: Nov 06, 2012
Posts: 297
    
    5

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.


Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61610
    
  67

Also do not name anything "submit"! You have broken the form by doing so!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: not getting the value of textarea in next jsp page