0

My jquery ajax call for a json file fails in Internet Explorer. All other explorers are doing good.

Code :

 $.ajax({
                    url: myurl + "?randomid="+Math.random(),
                    datatype: "json",
                    mimeType:"application/json; charset=UTF-8",
                    success: function(data,status,response) {
                        var JSONdata = $.parseJSON(response.responseText);
                        alert("Success");
                    },
                    error: function(e1,e2,e3) {
                        alert(e1 + " " + e2 + " " + e3);
                    }
            });

Internet Explorer throws the alert in the error section :

[Object Object] error No Transport

Thanks in advance for your help!

Prabakaran Raja
  • 720
  • 1
  • 11
  • 27

1 Answers1

1

You have cross domain request. You need to set this (before ajax call):

$.support.cors = true;
Arthur Halma
  • 3,943
  • 3
  • 23
  • 44