This works OK but I have the same autocomplete box 4 times on one page and I thought I would call the same code 4 times on the page but this will not work. The first time it is called is the only one that will work.

2/ There are going to be a lot of items in the array and as above was not working how I wanted I thought I would use a text file pre generated from the database and found this example which will not work at all:

Also any comments on wether 4 database calls are better/worse than reading a text file 4 times?

Rubble
—
2013-10-25T11:59:29Z —
#2

I will checkout mootools and see if that is any better.

Rubble
—
2013-11-03T20:40:42Z —
#3

Just getting back to this after working on the database section and have decided to give up with the Jquery UI autocomplete.I can not sort my problems or find an answer that works online and thought about joining the Jquery UI forum. The last question in the autocomplete section was in 2010 and only one or two of the questions there have received an answer.

Pullo
—
2013-11-04T07:10:16Z —
#4

Hi Rubble,

I just saw this having been away for a while (holiday).If you fancy, we could have a shot at making this work with jQuery UI autocomplete.I'm sure it won't be too difficult to sort out (famous last words :)).Just let me know.

Rubble
—
2013-11-04T08:20:30Z —
#5

Thanks for the offer Pullo.I also spent about three hours last night trying to get the Devbridge version working. The trouble is with both these pieces of code is there are not enough examples/instructions for somebody who knows nothing about JavaScript!

I am at work at the moment and can not do very much but this is some code that I have working to some extent. I have got around the multiple versions on one page by calling each part of the code a different name e.g. performer_A1, performer_A2 and using different sources available Performer1, availablePerformer2.

The wordlist is being populated by a php query ( which I can not post at the moment as I do not have access to it ) but this is not very efficient.

As I say I can not do a lot now until I get to my PC and I can post more of the code.

Pullo
—
2013-11-04T08:50:26Z —
#6

Hi Rubble,

No problem

Having two different arrays with the same content is not optimal and I'm sure we can do that better.

Just to check that I've understood everything correctly thus far:

You want four autocomplete boxes on the same page which are populated from a database.They should all contain the same data.Using jQuery autocomplete (with the source attribute) you got the first of them working, but the other three are refusing to play ball.

Is that right?

I should be around tonight, so I'm sure we'll get this sorted out soon.

Rubble
—
2013-11-04T09:02:44Z —
#7

Using jQuery autocomplete (with the source attribute) you got the first of them working, but the other three are refusing to play ball.

They all work now ( except for one doubles up the results for some reason ) but I need a database call for each one and they are all named differently. I tried creating a text file and using that as the source as it seemed the best way to do it - one database call when the page loads and then use the text file as the source - but I could not get that to work.

There are also 12 of these on the one page all using the same data and so you can see the reason for trying to streamline it!