• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hidden variable?

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

What is hidden variable and how to add and send them with request? Why we use them?

Thanks.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am guessing that you mean a hidden field in an HTML form.
As far as servlet request objects are concerned, the value in a hidden field is treated just like other form values.
You can write a value into a field when the html page is created or have Javascript put a value there.
Use hidden fields for any text value that you want to have submitted with the request but that you don't want the user to see or modify.
Bill
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by William Brogden:
I am guessing that you mean a hidden field in an HTML form.
As far as servlet request objects are concerned, the value in a hidden field is treated just like other form values.
You can write a value into a field when the html page is created or have Javascript put a value there.
Use hidden fields for any text value that you want to have submitted with the request but that you don't want the user to see or modify.
Bill



Thanks William. I got it completely.

But, how to write them in HTML page or through Javascript? Please, could some body give me code...

Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The HTML 4 Specification.

Also an excellent HTML 4 reference.
[ December 11, 2005: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
example is -:

<input type="hidden" name="user_name" value="">

then this field will go to next page as you submit the page but not being able to view bu the user
reply
    Bookmark Topic Watch Topic
  • New Topic