Page 1 of 1

[SOLVED] Autosuggest textbox

Posted: Tue May 22, 2007 4:35 am
by impulse()
Can anybody recommend an autosuggest script I can include in a PHP file. I've tried Autosuggest V2 (http://www.brandspankingnew.net/archive ... plete.html) but it doesn't work when I include it in my PHP file and I can't figure out why.

Other just don't work. And others are too complicated too use as I want. I'm looking for a simple Autosuggest box that will grab suggestions from an array, which is filled from a MySQL query.

Regards,

Posted: Tue May 22, 2007 4:40 am
by JayBird
Maybe we could help you fix the ones you have tried

Posted: Tue May 22, 2007 4:46 am
by impulse()
That would be appreciated.

I have a file (a.php) for example, which has several links, I want the Autosuggest page to be included in that PHP page when a link is clicked and you're taken to the same page but with a GET variable added.

The page loads at the moment but there are no suggestions being made when I type something in. But if I goto the original .html page then the suggestion works fine. There are 2 files to the Auto Suggest program - a .html which contains the textbox and a .php file which contains an array of data, but I have replaced this array with data from a MySQL DB.

Maybe this isn't working because I'm calling a .html file from a .php file, but in the .html file, that's calling another .php file which has the suggestions array (I hope that makes sense. Will I need to include the .php (with the suggestions array) some other way, rather than relying on the .html to include it?

Posted: Tue May 22, 2007 8:14 am
by impulse()
This has now been sorted. I found a script already on our system to do exactly what I wanted.

Oh well, another 5 hours wasted....