• Post Reply Bookmark Topic Watch Topic
  • New Topic

using the hidden value fields

 
Alfonso Harding
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know I must use the getParameter() method to retrieve a value from a form object but what is the reverse method to store a value in a hidden form field??
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

or in a JSP:

There is no magic to it.
[ October 16, 2002: Message edited by: Chris Mathews ]
 
Alfonso Harding
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris thanks but, this is the method to output the value. I need the jsp method to store a value in a hidden field so that a javascript function can process that value.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet/JSP is serverside, javascript is client side. You are asking about two different things.
Anything that is written out to the page can be accessed via javascript on that page but once the page is written the Servlet/JSP's work is done (until the next request that is).

I need the jsp method to store a value in a hidden field so that a javascript function can process that value.

Servlet/JSP "store" hidden fields by written them out as hidden fields in HTML.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!