aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Implementing previous searches Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Implementing previous searches" Watch "Implementing previous searches" New topic
Author

Implementing previous searches

Douglas Kent
Ranch Hand

Joined: Oct 06, 2000
Posts: 171
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

Unless you do so in cookies, JavaScript has no means to persist the data.

Why not use a server-side solution?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Douglas Kent
Ranch Hand

Joined: Oct 06, 2000
Posts: 171
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
Look at http://developer.yahoo.com/yui/autocomplete/ or http://codingforums.com/showthread.php?t=9865

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing previous searches