• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to retain values...

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.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic