Leth
Leth

Reputation: 145

Why does a jQuery Ajax request in IE is returning null?

This is how my request is looking right now. If i acces directly the server url it works. It's returning the needed data. In Chrome and Firefox works flawless. In IE it doesn't. The request is successful but the returned json is null. It does the same thing in Firefox 3.0 as in IE.

$.ajax({
                        type: "POST",
                        url: "http://www.tpltm.ro/dbm/index.php?r=routes/get&type=4e60922f2eb58",
                        cache: false,
                        contentType: "application/json; charset=utf-8",
                        dataType : "json",
                        success: function(msg) {
                          console.log(msg);
                               createMenu(msg);
                        },
                        error: function() {
                               console.log("Error: ajaxRequest");
                        }
                 });

Upvotes: 1

Views: 643

Answers (1)

Pierre Gayvallet
Pierre Gayvallet

Reputation: 2953

Are you sure the problem isn't simply the 'console.log(msg);' which would cause IE to silently fails before executing the 'createMenu' function ?

Upvotes: 1

Related Questions