tags:

views:

30

answers:

0

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 is like this.........

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('POST', requestUrl, true); XmlHttpRd.send(null);
} }

function HandleResponse() { //alert(XmlHttpRd.readyState); //alert(XmlHttpRd.status); if(XmlHttpRd.readyState == 4 && XmlHttpRd.status == 200) { //alert(XmlHttpRd.responseText); // when i alert this it showa me cutoff data var XmlRoot = XmlHttpRd.responseXML.documentElement;

          ///some more code here to access that remote page data////

    }

} please help me!!!