I've got auto-suggest working perfectly. It's great. I can use multiple text fields without any problems, except when I put the field within a form.
This is test code that works for the built-in array and for server side auto-suggest. Works perfectly in both cases. When I had this working, I'd thought that I would have no problems getting this into real code.
var customarray = ["apple", "alligator", "banana", "elephant",
"pear", "kingbird", "kingbolt", "kingcraft",
"kingcup", "kingdom", "kingfisher" ];
var obj = new autosuggest("tb", customarray);
var obj = new autosuggest("tb2", "", "http://127.0.0.1/autosuggest.wsgi/?field=npi&s=");
For whatever reason, auto-suggest is not reading in the strings from the fields when it's in a form.
It would be good to be able to give the id of the destination of selected value as an argument.
current code already has the callback function - it's very task is to allow you to do whatever you want to do. You can just get the field from inside the callback and assign it's value to the selected one, voila
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
I have a couple of questions regarding the ajax call
1, can the url have parameters? I would like to call a perl script and pass 2 parameters to it like year and model. 2, why do you need the question mark at the end of the url string?
here is what I would like to use
var line = 'FieldId'; var url = "vin.pl?Year="+year+"&Model="+model; asbbox[line] = new autosuggest(line, '', url);
Thanks for your help with this. The autosuggest version I am using is 2.3.
I know this is an old post, but I got parameters to work correctly by putting a "&" the end of my ajax url (ie, after my last argument). The code appends an additional argument to the url. That is why you have to have the '?' at a minimum at the end.
hello. I'm not good at English,but I'm trying to describe it clearly,please keep pacience. the suggestion never appear when I type something such as "abc" in the field,but when I delete them all with "backspace" key quickly it appears.it will not appear if I delete them slowly.I test it with IE and firefox,they are same result.
another question:it seems the start_check never works when I use ajax fetch data.it gets data when I input the first character despite I set it like this: this.start_check = 2; it will overload the server. here is the demo:http://22.214.171.124/tickets/index_ajax.html[^] thank any ideas.
Thanks a lot for the reply. I am trying to add the control into one of my gridview. For the first row, it is working but for the second the suggestion list is not coming at all.. Please help me to find a solution.
The control is inside the EditItemTemplate of gridview.
Last Visit: 31-Dec-99 19:00 Last Update: 22-Jan-17 22:49