var CollectionForAutoComplete = new Array();
function AutoCompleteTextBox() {
var data = CollectionForAutoComplete;
//var ac = $("#setcommonelement_ElementName").autocomplete(data);
//ac.disable();
// ac.setOptions({ noCache: true });
$("#setcommonelement_ElementName").autocomplete(data, {
minChars: 0,
width: 262,
matchContains: "word",
scrollHeight: 220,
cacheLength: 0
});
}
function generateStringForAutoComplete(CommonElementCollectionlist) {
if (CommonElementCollectionlist.length > 0) {
CollectionForAutoComplete.length = 0;
for (i = 0; i < CommonElementCollectionlist.length; i++) {
CollectionForAutoComplete.push(CommonElementCollectionlist[i].ElementName);
}
}
}
in run time i have loaded the collection and the push the collection into jquery autocomplet. but cache is not to be empty. please tell me how can i clear cache………..
Try this: