• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing previous searches

 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic