• 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

Implementing previous searches

 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Would like to implement a previous search capability for our Tomcat 5.5/JSP web app. Basic idea is to store the list of searches in the user's session object, store that list (serialized) to disk when user logs out. Not being that experienced with JavaScript, could use some ideas on how to implement this such when user clicks in the search text area, it shows the usual drop-down list of previous searches that user can select from.
Thanks in advance,
DHK
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unless you do so in cookies, JavaScript has no means to persist the data.

Why not use a server-side solution?
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm planning to use a server-side solution to persist. Where I am a little hazy is how to get display the previous searches to the user. I could use the fairly clunky drop-down list, but that's not what people are used to. I think they would prefer the style where when you place the cursor in the text box, the previous searches drop down... Also, I did not mention that my users all use Netscape 7.x.
-Doug
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I see. You're looking for a Javascript/CSS solution sort of like google suggestions?

Eric, you must have links to such examples, no?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at http://developer.yahoo.com/yui/autocomplete/ or http://codingforums.com/showthread.php?t=9865

Eric
reply
    Bookmark Topic Watch Topic
  • New Topic