Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to retain values...  RSS feed

 
reddy kl
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
my probelm is, i have two listboxes and some text fields and based on first list box selected item,the items in second list box are displaying .i used javascript function(onChange event) to submit the form.but i am loosing data in text fields as well as item in first list box..so how to retain those values...which is better..javascrpt or jsp sessoin..if anybody has code..plz help me out in this..
 
Francisco I
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to use javascript, there are 3 workarounds for this:
1. cookies
2. one page in a frame of height=0 and width=0. In this page, all you have are hidden input elements which you fill with values and then retreive the values
3. with hidden form fields in the current page, then, submit the page and the variables will be part of the request.
There is always JSP and the session variable which is far more powerful in terms of the things you can pass from one page to the other.
Yo choose.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!