Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to retrive a value from a check box on one page to another page containing a com

 
saurabh panwar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a check box on one page and combo box on another. When i click on a check box the value should be shown in the combo box.
i don't want to use the text field which is hidden.!!
thank u!!
 
Arunagiri, Shanmugham
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Pass a index value in the check box value property. When u click submit, only the check box which are checked will go as a parameter to a servlet. In this servlet add the values from the check box to Session object or Cookies. Then extract the value from the Session object or cookie in the next page which is generated by redirecting from first page.
Hope it would help u.
Arun
 
sameera k
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well u put the value which u want to be displayed in the 'value' field of the checkbox and when u have to get a parameter in the next page u get it and populate the combo box with it
even if there are multiple checkboxes give the same name to everyone only the value will differ .Then on the next page using getParameter value put those value in an array and then populate the combobox.
I dont think there is any need for any hidden parameters or adding those parameters to sessions
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic