PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Recent search query list - Help Needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recent search query list - Help Needed

    I am looking to have a div hold recent search queries from your search box. Is there any easy way to do this?

    Example:

    User searches for: 6afw4087

    After clicking search the query is added to a div in list format above the last searched query.

  • #2
    This is not a feature built into the software. So you'll need to write some code to get this working.

    What type of code you write depends on how you site works, what scripting languages your site supports, if the data needs to be persistent across page refreshes, if each visitor gets their own private list or if they share a global list and the number of searches on your site.

    If that page doesn't refresh and each users gets a personal list then maybe you can just use Javascript to load elements into the div on the onclick action. If the page refreshes, and / or you need data which persistent from one visit to the next, then maybe you need a back end data base to record searches per visitor. This also raises the issue of how to identify a unique visitor, e.g. by some sort of login, or by their IP address. There is also the issue of how and when elements might be removed from the list, as you don't want a recent search list to keep getting longer forever.

    You probably need to think through the requirements a bit more.

    Comment


    • #3
      First thank you for the reply.

      I would like to have each client have their own searches saved. No refreshing.

      Thank you for your help and hint of where to look. Now I need to find a tutorial on how this might work.

      Comment

      Working...
      X