Hi Experts,

i have been working on this since monday and still i dont seem to have a
clue what is stopping it from working.

What i am trying to do:
I have an autocomplete inputbox which displays matching results from the
database as soon as the user starts typing.

My problem is:
If a user start typing a characters into the autocomplete inputbox and
there's no matching result from backend,
i want a message "We donot have anything matching this search" to be
displayed.


Currently i am using this code:

function findValue(li) {
    var $Suggest = $("#operator")[0].autocompleter.findValue();
    if($Suggest == null){
        alert("we donot have any matching result");
    }
    return false;
}

$(document).ready(function(){
    $("#input").autocomplete("auto.php",
    {
        delay:10,
        lineSeparator: "^",
        cacheLength: 10,
        matchSubset:1,
        matchContains:1,
        onFindValue:findValue,
        formatItem:formatItem,
        autoFill:true
    });

return false;
)};

I am currently totally lost as i have tried everything but doesn't seems
work. Can anyone help?

Ta!

B

Reply via email to