[SOLVED] Autosuggest textbox

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

[SOLVED] Autosuggest textbox

Post 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,
Last edited by impulse() on Tue May 22, 2007 8:14 am, edited 1 time in total.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Maybe we could help you fix the ones you have tried
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post 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?
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post 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....
Post Reply