How to send JSON data in XDR using the POST method

javascript, json, xdr

Solution

May be your server side scripting is wrong.. this code seems to be correct....

Problem

I want to send JSON data in XDR using the POST method. I'm able to send JSON data, however the problem is `.` (DOT) symbols are converted into `_` (underscores). Here is the code: ``` if ($.browser.msie && window.XDomainRequest) { var xdr = new XDomainRequest(); xdr.open("POST",Path); xdr.send(JSON.stringify(data) + '&ie=1'); xdr.onerror = function() { alert('in error'); }; xdr.onload = function() { alert(xdr.responseText); } } else { jQuery.ajax({ type: "POST", url: Path, data: JSON.stringify(data), dataType: 'json', contentType: 'application/json', success: function(msg) { alert(msg); } }); } ```

Original source