• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Search Page - question

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a search page with the following parameters.

Search by Name: (textbox)

Search by SSN: (textbox)

Search by Zipcode: (textbox)

The user enters info in the textboxes and hits the search button. It takes the user to the searchResults page that displays the list. This searchResults page has a "New Search" button. When the user hits this button, the search page is displayed, but with empty textboxes. What should I do to store the entered information and display it when they hit the "New Search" button?
for example, in the search page, if they enter Search by zipcode as "55535" and hit the search button. a list is displayed in the searchResults page. When they hit the "New Search" button, now it should go back to the search page and contain the zipcode "55535" in that textbox.

Any suggesstions?
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sessions? Or hidden fields? More elaborately, by session, you can store the search fields which can be retrieved anywhere till the session lives. Or, by other way, you can probably store the search criteria a in the search result page by hidden fields and then while submitting to the previous page again i.e. search page, try to retrive values came from the request parameter in the main search criteria page and then fill those textboxes with such values! By this, you can avoid session. But you need to take care that if there are no values of such parameters, fill the text boxes by "". I hope you are able to understand what I mean to explain!
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am afraid "hidden fields" is better.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic