In php, I did it like following, and it's working perfect (although I have a problem with positioning in my thickbox...):
1) retrieve all values from the database and put them in a string (indeed, not a php-array!)
$rs=mysql_query("select name from table");<br/>
//if it's the last item from the series, don't put a comma after the value<br/>
var customarray = new Array(<<??php echo $array_names; ??>>;<br />
var obj = actb(document.getElementById('names'), customarray);<br />
And you're done!
I suppose that the approach will be similar in other languages like ASP.
P.S. It seems that this site is blocking the php-tags <?php ?>, so for that reason you have to change the line with 'var customarray' etc. in step 2...
I got one question, is this tested on newer browser such as Google Chrome or Safari or it's just IE and Firefox?
I tried it on Chrome and it doesn't work. Am I doing something wrong or it's not supported?
I use actb for populating names and the names coming is a dynamic list prepared by ajax.
Once the names are populated the actb works fine but as soon as the dynamic list is changed the mouse events stops working..
1. Pg up / pg down support, I get and error using pg down
2. A shortcut to show the list without needing a match would be perfect, allowing it to function almost like a dropdown with autocomplete
The pop up proposals seems to dissappear when the fields are placed inside a div tag - any suggestions to this problem?
I tried to make a small form, it worked beautifully. Then I moved the complete form with arrays and .js - references inside a div-tag. It stopped showing the proposed values, though it still worked, but utterly unusable. Noe I have found out that the proposed values are available - but they are below the div! What to do?
I am having the problem which shows the same array values for the two different text boxes. I have a text box name called "location" which having corresponding select box in which the location values populated from database.I have one more text box name called "branch" and correspong selectbox which will have branch values dynamically. While we change the values of location values from location selectbox, the braches will loaded based on the location. When we enter values in location textbox, it will shows the auto suggest dropdown from location select box. When we enter values in branch textbox, it will shows the auto suggest dropdown from branch select box which populated dynamically. The problem is, Now i want to alter or change the values in location textbox, now the it shows the auto suggest dropdown from branch select box not from the location select box.This is problem. Somewhere the recently generated keyword array is replacing.This might be the problem. If anybody knows about this problem, Please help me.
this script works great with a few small changes . . however . . when the external scripts are included . . a specific validation event returns false when it should be true. When a user clicks the addtocart asp:image of an asp:linkbutton . . it fires validation to ensure that the txtQuantity field is numeric . . with the autosuggest script files included . . this validation is returning false when it is clearly a number and should be fine. Does anyone have any clue as to why this might be happening? the asp:image, linkbutton, and textbox have nothing to do with the search textbox with autosuggest.