Autocomplete doesn't work in IE for large data (>2500)












1














$(function() {
$("[id$=T_MachineNoName]").autocomplete({
maxResults: 25,
maxShowItems: 5,
delay: 1000,
minLength: 1,
source: function(request, response) {
$.ajax({
url: '<%=ResolveUrl("~/App/ReqReport/T1700.aspx/GetMachineNo") %>',

data: "{ 'Factory': '" + document.getElementById('T_FactoryCode').value + "','prefix': '" + request.term + "'}",

dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function(data) {
response($.map(data.d, function(item) {
return {
label: item.split('***')[0],
val: item.split('***')[1],
val2: item.split('***')[2],
val3: item.split('***')[3]
}
}))
},
error: function(response) {
alert(response.responseText);
},
failure: function(response) {
alert(response.responseText);
}
});
},
select: function(e, i) {
$("[id$=T_MachineNo]").val(i.item.val);
$("[id$=T_AssetNo]").val(i.item.val);
$("[id$=T_MachineName]").val(i.item.val2);
$("[id$=T_MachineNoName]").val(i.item.val);
$("[id$=T_LineCode]").val(i.item.val3);
},
minLength: 1
});
});


Function GetMachineNo



    [WebMethod]
public static string GetMachineNo(string Factory, string prefix)
{
List<string> MachineNo = new List<string>();
using (SqlConnection conn = new SqlConnection())
{
conn.ConnectionString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlCommand cmd = new SqlCommand())
{
if (prefix.Trim() == "")
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo ";
}
else
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = @Factory and SetubiNo like '%' + @SearchText + '%' Order by SetubiNo";
}

cmd.Parameters.AddWithValue("@SearchText", prefix);
cmd.Parameters.AddWithValue("@Factory", Factory);
cmd.Connection = conn;
conn.Open();
using (SqlDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
MachineNo.Add(string.Format("{0}***{1}***{2}***{3}", sdr["Kimei"], sdr["SetubiNo"], sdr["KimeiName"],sdr["linecode"]));
}
}
conn.Close();
}
}
return MachineNo.ToArray();
}


This query cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo "; returns more than 2500 records. When run IE, unable to show data on screen. What could be the problem?



Thank you










share|improve this question
























  • set cash:false, in your ajax
    – shaghayegh sheykholeslami
    Nov 21 at 7:18










  • please specify how to set cash:false
    – เอ็ม เอ็ม
    Nov 21 at 7:26










  • dataType: "json", type: "POST", cashe:false In your ajax setting
    – shaghayegh sheykholeslami
    Nov 21 at 7:28












  • included: $.ajax({ type: "POST", cashe: false, contentType: "application/json; charset=utf-8", unable to solve a problem
    – เอ็ม เอ็ม
    Nov 21 at 7:37










  • try async:false too
    – shaghayegh sheykholeslami
    Nov 21 at 7:39
















1














$(function() {
$("[id$=T_MachineNoName]").autocomplete({
maxResults: 25,
maxShowItems: 5,
delay: 1000,
minLength: 1,
source: function(request, response) {
$.ajax({
url: '<%=ResolveUrl("~/App/ReqReport/T1700.aspx/GetMachineNo") %>',

data: "{ 'Factory': '" + document.getElementById('T_FactoryCode').value + "','prefix': '" + request.term + "'}",

dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function(data) {
response($.map(data.d, function(item) {
return {
label: item.split('***')[0],
val: item.split('***')[1],
val2: item.split('***')[2],
val3: item.split('***')[3]
}
}))
},
error: function(response) {
alert(response.responseText);
},
failure: function(response) {
alert(response.responseText);
}
});
},
select: function(e, i) {
$("[id$=T_MachineNo]").val(i.item.val);
$("[id$=T_AssetNo]").val(i.item.val);
$("[id$=T_MachineName]").val(i.item.val2);
$("[id$=T_MachineNoName]").val(i.item.val);
$("[id$=T_LineCode]").val(i.item.val3);
},
minLength: 1
});
});


Function GetMachineNo



    [WebMethod]
public static string GetMachineNo(string Factory, string prefix)
{
List<string> MachineNo = new List<string>();
using (SqlConnection conn = new SqlConnection())
{
conn.ConnectionString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlCommand cmd = new SqlCommand())
{
if (prefix.Trim() == "")
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo ";
}
else
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = @Factory and SetubiNo like '%' + @SearchText + '%' Order by SetubiNo";
}

cmd.Parameters.AddWithValue("@SearchText", prefix);
cmd.Parameters.AddWithValue("@Factory", Factory);
cmd.Connection = conn;
conn.Open();
using (SqlDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
MachineNo.Add(string.Format("{0}***{1}***{2}***{3}", sdr["Kimei"], sdr["SetubiNo"], sdr["KimeiName"],sdr["linecode"]));
}
}
conn.Close();
}
}
return MachineNo.ToArray();
}


This query cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo "; returns more than 2500 records. When run IE, unable to show data on screen. What could be the problem?



Thank you










share|improve this question
























  • set cash:false, in your ajax
    – shaghayegh sheykholeslami
    Nov 21 at 7:18










  • please specify how to set cash:false
    – เอ็ม เอ็ม
    Nov 21 at 7:26










  • dataType: "json", type: "POST", cashe:false In your ajax setting
    – shaghayegh sheykholeslami
    Nov 21 at 7:28












  • included: $.ajax({ type: "POST", cashe: false, contentType: "application/json; charset=utf-8", unable to solve a problem
    – เอ็ม เอ็ม
    Nov 21 at 7:37










  • try async:false too
    – shaghayegh sheykholeslami
    Nov 21 at 7:39














1












1








1







$(function() {
$("[id$=T_MachineNoName]").autocomplete({
maxResults: 25,
maxShowItems: 5,
delay: 1000,
minLength: 1,
source: function(request, response) {
$.ajax({
url: '<%=ResolveUrl("~/App/ReqReport/T1700.aspx/GetMachineNo") %>',

data: "{ 'Factory': '" + document.getElementById('T_FactoryCode').value + "','prefix': '" + request.term + "'}",

dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function(data) {
response($.map(data.d, function(item) {
return {
label: item.split('***')[0],
val: item.split('***')[1],
val2: item.split('***')[2],
val3: item.split('***')[3]
}
}))
},
error: function(response) {
alert(response.responseText);
},
failure: function(response) {
alert(response.responseText);
}
});
},
select: function(e, i) {
$("[id$=T_MachineNo]").val(i.item.val);
$("[id$=T_AssetNo]").val(i.item.val);
$("[id$=T_MachineName]").val(i.item.val2);
$("[id$=T_MachineNoName]").val(i.item.val);
$("[id$=T_LineCode]").val(i.item.val3);
},
minLength: 1
});
});


Function GetMachineNo



    [WebMethod]
public static string GetMachineNo(string Factory, string prefix)
{
List<string> MachineNo = new List<string>();
using (SqlConnection conn = new SqlConnection())
{
conn.ConnectionString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlCommand cmd = new SqlCommand())
{
if (prefix.Trim() == "")
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo ";
}
else
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = @Factory and SetubiNo like '%' + @SearchText + '%' Order by SetubiNo";
}

cmd.Parameters.AddWithValue("@SearchText", prefix);
cmd.Parameters.AddWithValue("@Factory", Factory);
cmd.Connection = conn;
conn.Open();
using (SqlDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
MachineNo.Add(string.Format("{0}***{1}***{2}***{3}", sdr["Kimei"], sdr["SetubiNo"], sdr["KimeiName"],sdr["linecode"]));
}
}
conn.Close();
}
}
return MachineNo.ToArray();
}


This query cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo "; returns more than 2500 records. When run IE, unable to show data on screen. What could be the problem?



Thank you










share|improve this question















$(function() {
$("[id$=T_MachineNoName]").autocomplete({
maxResults: 25,
maxShowItems: 5,
delay: 1000,
minLength: 1,
source: function(request, response) {
$.ajax({
url: '<%=ResolveUrl("~/App/ReqReport/T1700.aspx/GetMachineNo") %>',

data: "{ 'Factory': '" + document.getElementById('T_FactoryCode').value + "','prefix': '" + request.term + "'}",

dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function(data) {
response($.map(data.d, function(item) {
return {
label: item.split('***')[0],
val: item.split('***')[1],
val2: item.split('***')[2],
val3: item.split('***')[3]
}
}))
},
error: function(response) {
alert(response.responseText);
},
failure: function(response) {
alert(response.responseText);
}
});
},
select: function(e, i) {
$("[id$=T_MachineNo]").val(i.item.val);
$("[id$=T_AssetNo]").val(i.item.val);
$("[id$=T_MachineName]").val(i.item.val2);
$("[id$=T_MachineNoName]").val(i.item.val);
$("[id$=T_LineCode]").val(i.item.val3);
},
minLength: 1
});
});


Function GetMachineNo



    [WebMethod]
public static string GetMachineNo(string Factory, string prefix)
{
List<string> MachineNo = new List<string>();
using (SqlConnection conn = new SqlConnection())
{
conn.ConnectionString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlCommand cmd = new SqlCommand())
{
if (prefix.Trim() == "")
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo ";
}
else
{
cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = @Factory and SetubiNo like '%' + @SearchText + '%' Order by SetubiNo";
}

cmd.Parameters.AddWithValue("@SearchText", prefix);
cmd.Parameters.AddWithValue("@Factory", Factory);
cmd.Connection = conn;
conn.Open();
using (SqlDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
MachineNo.Add(string.Format("{0}***{1}***{2}***{3}", sdr["Kimei"], sdr["SetubiNo"], sdr["KimeiName"],sdr["linecode"]));
}
}
conn.Close();
}
}
return MachineNo.ToArray();
}


This query cmd.CommandText = " Select SetubiNo,SetubiNo + ': ' + Kimei as Kimei,Kimei as KimeiName,linecode from M_SETUBI where FactoryCode = '001' Order by SetubiNo "; returns more than 2500 records. When run IE, unable to show data on screen. What could be the problem?



Thank you







javascript c# asp.net autocomplete






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 6:16









adiga

6,02562141




6,02562141










asked Nov 21 at 6:11









เอ็ม เอ็ม

61




61












  • set cash:false, in your ajax
    – shaghayegh sheykholeslami
    Nov 21 at 7:18










  • please specify how to set cash:false
    – เอ็ม เอ็ม
    Nov 21 at 7:26










  • dataType: "json", type: "POST", cashe:false In your ajax setting
    – shaghayegh sheykholeslami
    Nov 21 at 7:28












  • included: $.ajax({ type: "POST", cashe: false, contentType: "application/json; charset=utf-8", unable to solve a problem
    – เอ็ม เอ็ม
    Nov 21 at 7:37










  • try async:false too
    – shaghayegh sheykholeslami
    Nov 21 at 7:39


















  • set cash:false, in your ajax
    – shaghayegh sheykholeslami
    Nov 21 at 7:18










  • please specify how to set cash:false
    – เอ็ม เอ็ม
    Nov 21 at 7:26










  • dataType: "json", type: "POST", cashe:false In your ajax setting
    – shaghayegh sheykholeslami
    Nov 21 at 7:28












  • included: $.ajax({ type: "POST", cashe: false, contentType: "application/json; charset=utf-8", unable to solve a problem
    – เอ็ม เอ็ม
    Nov 21 at 7:37










  • try async:false too
    – shaghayegh sheykholeslami
    Nov 21 at 7:39
















set cash:false, in your ajax
– shaghayegh sheykholeslami
Nov 21 at 7:18




set cash:false, in your ajax
– shaghayegh sheykholeslami
Nov 21 at 7:18












please specify how to set cash:false
– เอ็ม เอ็ม
Nov 21 at 7:26




please specify how to set cash:false
– เอ็ม เอ็ม
Nov 21 at 7:26












dataType: "json", type: "POST", cashe:false In your ajax setting
– shaghayegh sheykholeslami
Nov 21 at 7:28






dataType: "json", type: "POST", cashe:false In your ajax setting
– shaghayegh sheykholeslami
Nov 21 at 7:28














included: $.ajax({ type: "POST", cashe: false, contentType: "application/json; charset=utf-8", unable to solve a problem
– เอ็ม เอ็ม
Nov 21 at 7:37




included: $.ajax({ type: "POST", cashe: false, contentType: "application/json; charset=utf-8", unable to solve a problem
– เอ็ม เอ็ม
Nov 21 at 7:37












try async:false too
– shaghayegh sheykholeslami
Nov 21 at 7:39




try async:false too
– shaghayegh sheykholeslami
Nov 21 at 7:39

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53406190%2fautocomplete-doesnt-work-in-ie-for-large-data-2500%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53406190%2fautocomplete-doesnt-work-in-ie-for-large-data-2500%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen