Using Javascript
I have an autocomplete function which uses the current value of an input ("onkeyup") to get JSON data from a URL "XmlHttpRequest()" which it then parses and appends to the DOM.
Then as the value changes it removes the previously appended list items and appends the new items.
The problem with this is that the value changes constantly, resulting to an annoying blinking effect.
I tried using "setTimeout" so the function only executes 200ms after the user stopped typing, but the effect still remains.
Aucun commentaire:
Enregistrer un commentaire