Hi Jorn, Is there a way to call a function when no results are returned by the input the user has typed into the autocomplete?
This would be ideal as an option or a method for the autocomplete object. I've seen a few people ask for this on your site and also here. You mentioned including such functionality in a future release but I don't think it was done. Anyone mange to do this or have pointers on how I could go about implementing it myself? If I succeed maybe we can add this as a feature to the current build of autocomplete? Cheers, VM On Aug 27, 8:04 am, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > The download includes demo PHP scripts that you can look at. Or check > it online > viahttp://dev.jquery.com/view/trunk/plugins/autocomplete/demo/search.phps > (linked fromhttp://jquery.bassistance.de/autocomplete/demo/) > > Jörn > > On Tue, Aug 26, 2008 at 10:11 PM, Mattl <[EMAIL PROTECTED]> wrote: > > > Thanks Jörn, > > Is there a tutorial or demo that shows what the php file that queries > > the db should look like, or in what format the results need to be > > returned in? > > > ie what does 'my_autocomplete_backend.php' look like? > > > I've not been able to find one. > > > Thanks in advance, > > Matt > > > On Aug 25, 11:32 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]> > > wrote: > >> The autocomplete plugin > >> (http://plugins.jquery.com/project/autocompletex) can do that. Set the > >> one up as usual, and configure the other one with a dynamic extra > >> paramter: > > >> $("#second").autocomplete("url", { > >> extraParams: { > >> first: function() { > >> return $("#first").val(); > >> } > >> } > > >> }); > > >> Jörn > > >> On Mon, Aug 25, 2008 at 11:22 PM, Mattl <[EMAIL PROTECTED]> wrote: > > >> > Hi, > >> > Anyone know of a jQuery plugin similar to the Autocomplete that could > >> > do the following? > > >> > I have a mysql db with two columns, 'Lot No' and 'Description'. > > >> > I have a form with two input fields, 'Lot No' and 'Description' and > >> > I'd like the 'Description' input field to be auto-populated from the > >> > database based on the entry the user puts into the 'Lot No' input > >> > field. > > >> > ie if they typed in '1' into the 'Lot No' field then the 'Description' > >> > input field would call up the corresponding row entry to '1' from the > >> > database. > > >> > Hope I've explained this clearly enough... > > >> > Many thanks > >> > Matt