• 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

How to retain values...

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic