YAHOO.util.Connect.asyncRequest does not work in Safari

Posted by 24x7Programmer on Stack Overflow See other posts from Stack Overflow or by 24x7Programmer
Published on 2011-01-07T12:51:46Z Indexed on 2011/01/07 12:53 UTC
Read the original article Hit count: 196

Filed under:
|

When I request a webpage using YAHOO.util.Connect.asyncRequest in Safari I always get Communication Failure message in callback's failure properties statusText. The same method works in IE. What could be wrong here?

Here is the code. When the code is executed I always get two alerts: "Three" and "communications failure undefined" (corresponding to the second alert in the failure part below.)

Also when I attach the debugger and put break point in the SAProvision.aspx's page load event, the break point is not hit. So it is sure that in safari the page is not being called. While the same is called when executed from IE.

function ProvisionBlade() {
    var path = "http://localhost/SC/Dashboard/SAProvision.aspx"
    YAHOO.util.Connect.asyncRequest("POST", path, callbacks1, null);
}


var callbacks1 = {
    success: function(o) {
        var check = "test";
        alert(o.responseText);
    },

    failure: function(o) {
    alert("Three");
        alert(o.statusText + ' ' + o.responseText);
    }
}

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about yui