In this data.php, i created the node <listdata></listdata> with each val1,key1 delimited by |. Now, when i used your script to fetch data from this file, it became very slow, taking almost 10 seconds to bring up the suggestion.
I am sure, something I am doing is not correct. Could you please help here. I'd like to mention that file is holding some 1000+ records.
Also, i'm no pro, just working on the first project.
Thanks in advance
P.S.--> I tried hard coding the array in autosuggest.js file (the file size reached 191kb) the script worked fine. normal speed. But I don't think its the right way to do it. because the array needs to be updated everytime data changes in database table
This doesn't work properly. In this case there are no suggestions given when an input contains a character a.
I think now a delimeter can only be a single character and not a string.
People give frequently inputs like "apple and pear".
I'd like to make this function more intuitive by the string " and " acting as delimiter.
First of all, nice work! I have a question though. This does not seem to work if I am generating a text box dynamically and append the autosuggestion script with it. Specifically, the html code below added a text box each time you click the add button, but that text box cannot auto suggest even though I generated the autosuggest script with the new text box. Any suggestions?
I have been trying to implement a variable which will tell me if the user has selected an item, or if the text typed is not in the list.
How should this be done? I have of course tried with the selectedIndex, but once a user first has chosen an item and afterwards changed the text to something not in the list, the selectedIndex still remembers the last selected item.
I have of course tried with the selectedIndex, but once a user first has chosen an item and afterwards changed the text to something not in the list, the selectedIndex still remembers the last selected item.
This is a bug, of course - I'll try to find a solution shortly (in a few hours).
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).