Hello, I'm currently facing an issue with sending request parameters through the XMLHttpRequest.send(params) method when trying to get a response from a Web Service. The request parameters seem to not be getting sent properly.
Below is the code snippet causing the problem:
<script type="application/javascript">
window.onload = function myFunc()
{
var httpRes;
if (window.XMLHttpRequest)
{
httpRes=new XMLHttpRequest();
}
else
{
httpRes=new ActiveXObject("Microsoft.XMLHTTP");
}
httpRes.open("POST", "http://192.168.11.59:3333/Reports/GenerateMobReportJsonData", true);
var params = {'FromDate':'02/19/2013 17:30','ReportId':'1','LocationId':'1','ToDate':'02/19/2013 19:00','TeamId':'1'}
httpRes.setRequestHeader('content-type', 'application/json');
var jsonReq = JSON.stringify(params);
//alert(jsonReq)
httpRes.send(jsonReq);
}
</script>
I would greatly appreciate any assistance or insights on how to resolve this issue...