views:

31

answers:

2

Hey, Is it possible to change the "data source"- the autocomplete from this jquery code:

$(".textbox").autocomplete(
"**autocomplete.php**",
{
    delay: 10,
    minChars: 2,
    matchSubset: 1,
    matchContains: 1,
    cacheLength: 10,
    onItemSelect: selectItem,
    onFindValue: findValue,
    formatItem: formatItem,
    autoFill: true
}
);

to get data from webservice?? -

            url: "SearchService.asmx/Search",
            data: "{'text':'" + request.term + "'}",
            dataType: "json",
            type: "POST",
            contentType: "application/json; charset=utf-8",

I dont know how to change that autocomplete to a webservice..

thanks

A: 

This looks like jquery UI, is that right? This question may have the answer you are after: http://stackoverflow.com/questions/2471166/jquery-autocomplete-jquery-ui-1-8rc3-with-asp-net-web-service

campo
A: 

I'm trying to change the data source in this Autocomplete mod: http://www.pengoworks.com/workshop/jquery/autocomplete.htm

Thank's.

Adam