0

I'm trying to use the Unofficial Xbox API to request a JSON string and then process that using VB.NET.

Here is the link; Unofficial Xbox API

Using the below code I've managed to successfully load the data using Firefox, but IE returns and "Access Denied" error; which I guess is due to this being a cross-domain request using JSON not JSONP.

Is there any way I can get around this? Even if it's to load the entire JSON string. I tried to use JSONP, but the data is in an incorrect format for that.

            $.ajax({
                url: 'https://xboxapi.com/json/profile/RTriggerHappy',
                cache: false,
                dataType: 'json',
                crossDomain: true,
                success: function (data) {
                    $('#txtUsernameJS').val(data.Player.Gamertag);
                    $('#txtGamerScoreJS').val(data.Player.Gamerscore);
                    alert("worked");
                },
                error: function (request, status, error) {
                    alert(status + ", " + error);
                }
            });
Antonio Moore
  • 930
  • 4
  • 14
  • 21

1 Answers1

0

Try doing your JSON in PHP instead of Javascript, this will prevent the "Access Denied" message in IE.

Enijar
  • 6,387
  • 9
  • 44
  • 73