One way to achieve that is to trigger the search method when appropiate, eg. on blur. Something like this:
$("#suggest1").autocomplete(cities).blur(function() { $(this).search(); }).result(function(event, data, formatted) { alert(!data ? "No match!" : "Selected: " + formatted); }); Let me know if that works and what could be improved. Jörn On Mon, Aug 18, 2008 at 2:02 PM, mmzaman <[EMAIL PROTECTED]> wrote: > > I'm using bassistance.de , Jörn Zaefferer's autocomplete plugin and > loving it. > > However I need to be able to call a function or run some javascript > code if the inputted text by the user into the autocomplete field > returns no results. > > This would be ideal as an option or a method for the autocomplete > object. > > I've seen a few people ask for this on his site and also here. He > mentioned including such functionality in a future release but I don't > think he got around to it. > > 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, > M >