Jquery autocomplete: autocomplete doesn't stop if line doesn't match

I have used the autocomplete feature in jquery. The data source is php-back-end results.

$("#ice_id").autocomplete("ice-ver.php", { extraParams : { flavour_id: $("#flavour_id").val() } });

      

Let's take the following example:

We enter flavor id 3992 ... (and 3992 exists in the database and is properly returned by the php backend). If we type 3992999 now, the autocomplete function should show something ... but unfortunately it still does (could the problem be that I am using integers instead of strings or characters?)

Thanks in advance for any hints and best wishes

Danial

+2


a source to share


2 answers


If it shows something, doesn't that mean there is a result from PHP code? Check if it really is the way you want it and if you post it someone might be able to help



+1


a source


I agree with the syam. Your PHP code seems to be returning values. Try to request PHP-script directly in the browser via-url-to-php-script? Flavor_id = 3992999.



There are different autocomplete plugins for jquery. If you instead use one of the jquery ui (http://jqueryui.com/demos/autocomplete ) your entered value is automatically passed to the URL resource as the "term" parameter. See if PHP-script helps you solve the problem.

0


a source







All Articles