Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Ajax request problem in IE8

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #36572
    XaviJr
    Participant

    Hi guys. I’m developing this application for facebook and it works just fine except for IE8 and inside facebook tab.

    I have the browser in develop mode and I’m getting an access denied error when I try to call my webservices with this code:


    var isIE8 = window.XDomainRequest ? true : false;
    if (isIE8) {
    myReq = new window.XDomainRequest();
    myReq.onload = $callback;
    myReq.open("GET", $url, true);
    myReq.send();
    } else {
    myReq = new createXMLHttpRequest();
    myReq.onreadystatechange = $callback;
    myReq.open("GET", $url, true);
    myReq.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
    myReq.send();
    }

    I have the IE8 conditional because I was trying to solve with this tutorial: http://www.leggetter.co.uk/2010/03/12/making-cross-domain-javascript-requests-using-xmlhttprequest-or-xdomainrequest.html
    And yes, I configured my webservices with: Access-Control-Allow-Origin: *

    I’ve tried the jQuery.ajax() function as well, but it’s event stranger. When I use it it works in all browser except again in IE8 but I don’t receive any error, it’s like that request isn’t there.

    Is there any other way to make ajax requests or any solution for this?

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.