• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

how to display the text area in console  RSS feed

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am   writing an HTML which is linked to the Servlet. I am able to get the output of the name and city fields in the console . However, i am unable to get the details of the textarea in the console.

HTML program -



Servlet program -



output-
sucheta
mumbai
null


how to get the comment   section in the textarea printed the eclipse console with method = "post"
 
Sucheta Shrivastava
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here the comment section i am getting null. I name and city get shown by the submit button but how to view the comment section
 
Saloon Keeper
Posts: 4702
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "comment" field is outside of the form tag in the HTML, so it does not get submitted to the server.

The "form = "userform"" attribute does nothing, and you should remove it.
 
Author and ninkuma
Marshal
Posts: 66789
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, in HTML5 the form attribute should cause the textearea to be included in the form even though it is physically outside the form. I have never done this so I can't vouch for how well it is implemented in the browsers.

In this case, there is clearly no reason why the text area needs to be outside the form, so the simplest fix is to move it to within the form.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!