1

I use ajax for call remote webpage,this works on ff,chrome and ie correctly, i test using develop site and it works correctly

also the header files on remote page allows the cross domain request,

but when i add this code to live site it giving. this gives on ie other browsers are working fine

SCRIPT16389: Unspecified error on xmlhttp=new XMLHttpRequest();

i also changed the headers to allow request from live site, but no luck can any one help me please

var xmlhttp;
    if (window.XDomainRequest)
    {
        xmlhttp=new XDomainRequest();
        xmlhttp.onload = function(){ //alert(xmlhttp.responseText)
        };
    }
    else if (window.XMLHttpRequest)
        xmlhttp=new XMLHttpRequest();
    else
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    xmlhttp.onreadystatechange=function()
    {
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
            alert(xmlhttp.responseText);
    }
    xmlhttp.open("GET",'http://oncorecables.com/stock/jumi/cross.php',true);
    xmlhttp.send();

live site http://mychatterbook.com/profiles/members/

thank you

1 Answer 1

2

Are you using IE8 in InPrivate mode?

There is a bug in IE8 which causes cross-domain HTTP requests using the XDomainRequests object to fail when the user is browsing in InPrivate Browsing mode (See http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx).

I myself have worked around this by using jQuery's $.get() method. If you're not using jQuery in your website, you might want to go through jQuery's source code to investigate how they've worked around this as they apparently have managed to do this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.