How to make and AJAX live search?

Discussion in 'Web Design and Development' started by tominated, Mar 2, 2007.

  1. tominated macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #1
    Does anybody know how to make a live search for my own website? or even a tutorial (that involves indexing your site)? I would really like one that acts like spotlight. Thanks in advance;)
     
  2. besson3c macrumors member

    Joined:
    Apr 9, 2003
    #2
    Your content needs to reside in a dynamic backend for a search like this to work. If your pages are static, you might be able to build a database based on f lat file by spidering your site, but certainly your best bet will be to use a relational database backend.

    Are you comfortable with creating dynamic content?
     
  3. tominated thread starter macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #3
    i guess i am ok with that. I do have wordpress and a forum, so this would be my best bet.
     
  4. rogersmj macrumors 68020

    rogersmj

    Joined:
    Sep 10, 2006
    Location:
    Indianapolis, IN
    #4
    There are AJAX search plugins for Wordpress already. This is not a simple matter that someone can just explain in a forum post, unfortunately. It's going to depend on how your site is setup. There are tons of tutorials out there; Google some and check them out. However, the easiest course of action is going to be to get one of the plugins for Wordpress and modify it to suit your needs.
     
  5. tominated thread starter macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #5
    it's just that i want it for my whole site, not just wordpress. I have searched and searched and searched, but i cannot find what i want. The only thing relatively similar to what I want is the wordpress plugin, "addicted to live search", but i can only use it with wordpress, not my whole site.
     
  6. besson3c macrumors member

    Joined:
    Apr 9, 2003
    #6

    Use WordPress to drive your site, and use mod_rewrite rules to convert WordPress URLs to URLs outside of the WP directory.
     
  7. tominated thread starter macrumors 68000

    tominated

    Joined:
    Jul 7, 2006
    Location:
    Queensland, Australia
    #7
    I don't want wordpress to drive my site as i am using rapidweaver. I like it the way it is, but thanks anyway;)
     
  8. besson3c macrumors member

    Joined:
    Apr 9, 2003
    #8

    Well, you'll need a dynamic backend to provide a search engine of the content provided on your site. Rapidweaver develops static content, so if you really want this feature you are going to have to make some modifications to your site.

    Like I said, there are some search scripts that will spider through your content and create a searchable index, but this script would need to be run periodically to generate a new index, and in doing so your searches will not find new content until your index is updated. This is yet another reason for moving to a database-driven/dynamic backend.
     

Share This Page