JavaScript & PHP on a friendly basis with AutoComplete

I recently put together a third example for the SAJAX project (http://www.modernmethod.com/sajax/); this one uses the concept behind Google Suggest, which is to populate an HTML input box with an array coming from the server.

Very useful if you have lots of input boxes on a page, each which you want to have a different set of autocomplete data.

The code could be extended to work just like Google Suggest; the hard part was figuring out how to get the array passed back intact. I tested it with >5000 items in the array, and it worked seamlessly.

The code is at:

http://www.hatwhite.com/sajax/

544 thoughts on “JavaScript & PHP on a friendly basis with AutoComplete

  1. Re: JavaScript & PHP on a friendly basis with AutoComplete
    Hi, I’m not really so anonymous. I’m JDJS, and I thought I was logged in when I posted. Anyone like JavaScript and want to help expand this to the full [url=http://www.google.com/webhp?complete=1&hl=en]Google Suggest[/url] interaction?

    -Jared

    • Re: JavaScript & PHP on a friendly basis with AutoComplete
      That is very cool. Thank you for the submission!!

      It doesn’t seem to be working in FireFox at the moment. But, if I get some time this weekend I’ll try and look into that.

      Thanks again!

      – Dan

Leave a Reply to Daniel Holmes Cancel reply

Your email address will not be published. Required fields are marked *