Q:

ajax post, firefox and IE wont work

I'm making an jquery ajax post to a php script.  this works in Chrome 19 and Safari 5.
$.ajax({
    type:'POST',
    async:true,
    url: '/site/phpscript.php',
    data: {
            xyArray: xyArray,
            xmlDataString:xmlDataString,
            id:id
        },
    success: function(results){ alert('success'); },
    error: function()
    {
                alert('error');
    }
});

When I test this, this will work in chrome and safari.  but not in IE and firefox.
but.. if the size of the xmlDataString is small, it will work.  
is there a size limitation for firefox when posting using jQuery ajax?

A:

EDIT: Yes, Firefox has a limit of 4096 characters.
Some workaround in here:
http://forums.ext.net/showthread.php?8208-Firefox-Ajax-limit-of-4096
EDIT: from that article:
I created a JS function to handle the "result" from the web service ajax call...which works in both FF and IE...
just call that instead...
var strResult=Ext.DomQuery.selectValue("string", result, "");
function getWebSvcString(result)

{

var strResult="";

var stringElement = result.getElementsByTagName("string")[0];

if (stringElement.text!=null &amp;&amp; stringElement!=undefined){

strResult=stringElement.text;

// alert("IE: "+strResult.length);

}

else if (stringElement.textContent!=null &amp;&amp; stringElement.textContent!=undefined)

{

strResult=stringElement.textContent;

// alert("FF: "+strResult.length);

}

return strResult;

}

Also, I would leave the Post out, as it is the default. It will just make your code cleaner. Also, I would add an error message to the response of the error event in your Ajax call. That might give a clue too.
$.ajax({
    async:true,
    url: '/site/phpscript.php',
    data: {
            xyArray: xyArray,
            xmlDataString:xmlDataString,
            id:id
        },
    success: function(results){ alert('success'); },
    error: function(xhr, ajaxOptions, thrownError){
                    alert(xhr.status);
                    alert(thrownError);

    }
});

In my experience, when browsers have trouble with Ajax calls it is because the data is malformed. Can you run the post and response through a validator? Perhaps there is a character missing, an extra comma somewhere, or a closing tag missing.

