views:

21

answers:

1

I used Drew Wilson's autocomplete, its really well made but poorly documented. I am able to initialize the autocomplete plugin, but i cannot get the values selected.

I tried using this:

$("#txtReceipient").autoSuggest(data.items, {
                    minChars: 2,
                    matchCase: false,
                    selectedItemProp: "name",
                    searchObjProps: "name",
                    selectedValuesProp: "value",
                    startText: "Type the name of the receipient here"
                });

and tried to retrieve the values by:

alert($('#txtReceipient').val());

I'm getting undefined value as the alert returns. im at the end of my wits. help!

A: 

solved it.

a straightforward documentation would have helped a lot:

alert($(".as-values").val());
Martin Ongtangco