Here i had use ajax, in which when ajax give response at that time it cut the text automatically after some characters (6140 characters), so is it limit of ajax respose? and if yes then how would be we can solve this?
If the string I am passing to javascript from jsp is too large javascript does not get it all the data. The magic number appears to be 6140 characters, anything below that it works fine, anything above and if I alert the ajax.response, I see the string is cutoff. Any ideas where this limitation is defined? how to solve this?
i had use pure ajax and learned from www.w3school.com, so just same like that i had use ajax and get respose in xml tag.
My code :
var XmlHttpRd = false; function CreateXmlHttpRd() { try { XmlHttpRd = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { try { XmlHttpRd = new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc) { XmlHttpRd = new XMLHttpRequest();//for browser mozila, opera, firefox. } } }
function getAllChat()
{
var requestUrl = "remotePage.jsp?r="+Math.random();
//alert(requestUrl);
CreateXmlHttpRd();
if(XmlHttpRd)
{
XmlHttpRd.onreadystatechange = HandleResponse;
XmlHttpRd.open('GET', requestUrl, true);
XmlHttpRd.send(null);
}
}
function RefreshStatus() { if(refStatus) getAllChat(); }
function HandleResponse() { //alert(XmlHttpRd.readyState); //alert(XmlHttpRd.status); if(XmlHttpRd.readyState == 4 && XmlHttpRd.status == 200) { //alert(XmlHttpRd.responseText); // here i uncomment alert then respnse text seen cutofff var XmlRoot = XmlHttpRd.responseXML.documentElement;
//// Some Code here to get data//////////
}
}
please help me!!!