I am doing a cross domain request using $.ajax , it works on firefox and chrome but does not issue a call on IE 7,8. can anyone tell me whats wrong with the following??
- I have used JSON, JSONP, left that method due to some custom restrictions
- Usin Allow-access-control-origin headers already on my site(without that chrome and firefox was not making successful requests )
Have already tried "https://developer.mozilla.org/en/http_access_control"
$.ajax({ type: 'GET', url: "http://anotherdomain.com/Service/GetControl?id=" + zoneID , cache: false, contentType: "application/x-www-form-urlencoded" , async: false, beforeSend: function (request) { //alert('before send'); //request.setRequestHeader("X-Requested-With", "XMLHttpRequest"); //request.setRequestHeader("X-PINGOTHER", "pingpong"); } , success: function (data, status) { //alert("Data returned :" + data); //alert("Status :" + status); if (status == "success" && data != "") $("#" + div.id).append(data); else $("#" + div.id).attr("style", "display:none;"); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); alert(errorThrown); }
});
I am stuck with this code for last 2 days and have tried various tips present on multiple sites, but no luck yet. hope someone might have a working tip;).