• Post Reply Bookmark Topic Watch Topic
  • New Topic

creating hidden text fields..

 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi again...
i'm getting some values from my servlet into my applet but i dont need to display all the info..
is there a way i can set a textfield to say "hidden" so i can store some info in the background???
 
Angela Lamb
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call setVisible(false) on any Component to keep it hidden, but why do you need a text field at all if you aren't planning on showing it? You can just use a regular variable to hold the info, unless I'm misunderstanding your question.
 
Brett B Doehr
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to set some values on a page that get propagated but don't want them displayed like a "text" object would be, try:
<input name="myVariable" type="hidden" value="someValue">
You get then do the same kind of get that you would if the type was "text" instead of "hidden", but the input field won't be displayed. Hopefully this is what you wanted.
--Brett.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!