views:

818

answers:

1

Hi All,

I am using Jquery's autocomplete plugins to show smart search textbox in my application.

To get better Idea plz refere following url

http://docs.jquery.com/Plugins/Autocomplete

Now what I want is, When user goes on typing in the textbox respected filter result get append to the textbox which is fine. If the user types character which doesn't match the result then I want to clear that character.

Means any how I want to force the user to type only those characters that are in the autocomplete result.

Thanks in advance.

Sachin

+1  A: 
$('#'+Artist.id).autocomplete(responce, { 
        matchContains:false, 
        minChars:1,  
        autoFill:false, 
        mustMatch:true, 
        cacheLength:20, 
        max:20 
    });

you can override .autocomplete(responce) with the one mention above and set the parameter as per your requirment.

The MustMatch=true solve my problem.

Sachin