i am creating autocomplete using generic handler.i want show MinimumPrefixLength="3" and CompletionSetCount="8"
<script type="text/javascript">
var loggedid = session_login_id;
function AutoComplatetext(id) {
// fbval = id;
var jSp = jQuery.noConflict();
jSp("#" + id).autocomplete("Autosearch.ashx?Uid=" + loggedid, {
width: 250,
scroll: false,
formatItem: function (data, i, n, value) {
//alert(data, i, n, value);
var ap = document.getElementById('buyerdetails');
ap.innerHTML = "";
ap.innerHTML = value;
var txtval = document.getElementById(id).value;
document.getElementById("setdata").style.display = "none";
if (txtval == " ") {
document.getElementById(id).value = "";
}
},
formatResult: function (data, value) {
}
});
return true;
}
function getselected(buyer_name, buyer_email, currency_symbol, creation_amount_paid, trasaction_time, creation_title) {
PageMethods.setbuyerinfo(buyer_name, buyer_email, currency_symbol, creation_amount_paid, trasaction_time, creation_title, function (response) {
response = response.replace(/(?:\r\n|\r|\n)/g, '<br />');
document.getElementById("setdata").innerHTML = response;
});
document.getElementById("setdata").style.display = "block";
document.getElementById("buyerdetails").style.display = "none";
}
function hidediv() {
document.getElementById("setdata").style.display = "none";
document.getElementById("buyerdetails").style.display = "block";
}
function AutoComplatehidediv(id) {
// document.getElementById("setdata").style.display = "block";
var ab = document.getElementById("buyerdetails").innerHTML = "";
if (ab!= " ") {
return getselected(buyer_name, buyer_email, currency_symbol, creation_amount_paid, trasaction_time, creation_title);
document.getElementById("setdata").style.display = "block";
}
}
function textboxclear(id) {
id = document.getElementById("buyerdetails").innerHTML = "";
if (id == "") {
document.getElementById("buyerdetails").style.display = "none";
}
}
</script>