none
I am getting error when i call ajax call in firefox error is Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]

    Dotaz

  • Dear friends,


                        I want a result from a specific page for each click,i did that using an ajax call,its working fine with ashx in IE,but in Firefox its giving error as "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]"
    the call is gng and result is returning back from ashx handler,but when i access the result using xmlhttp object its giving above error.



    my code is  as below



    var xmlHttp1;

    function jsRemoteCall1(TargetUrl) {

    try {

    if (window.XMLHttpRequest){

    xmlHttp1 = new XMLHttpRequest();

    xmlHttp1.open("get",TargetUrl,true);

    xmlHttp1.onreadystatechange = onRequestChange1;

    xmlHttp1.send();

    } else {

    if (window.ActiveXObject) {

    xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");

    xmlHttp1.open("post",TargetUrl,true);

    xmlHttp1.onreadystatechange = onRequestChange1;

    xmlHttp1.send();

    }

    }

    } catch(e) {

    //alert(e)

    }

    }

    //ravi for Load Latest News

    function onRequestChange1() {

    //0 = uninitialized

    //1 = loading

    //2 = loaded

    //3 = interactive

    //4 = complete

    try{

    if (xmlHttp1.readyState == 4) {

    ///alert(xmlHttp.status);

    // alert(xmlHttp1.readyState);

    try{

    alert(xmlHttp1.responseText);

    if(xmlHttp1.status){

    // alert('hi');

    if (xmlHttp1.status == 200) {

    xmlDoc1=xmlHttp1.responseText;

    //alert(xmlDoc1);

    if((xmlDoc1==null)||(xmlDoc1==""))

    {

    alert('respective Edition is not Available');

    }else{

    var name = 'w' + Math.round(Math.random()*(1000000000));

    w = screen.width - 10;

    h = screen.height - 40;

    window.open(xmlDoc1,name,'toolbar=no,menubar=no,resizable=yes,scrollbars=no,left=0,top=0,width=' + w + ',height=' + h);

    }

    } else {

    alert("There was some problem retrieving the page \n" + xmlHttp1.statusText + xmlHttp1.status);

    }

    }

    }catch(e){

    //alert(xmlHttp1.responseText);if (window.XMLHttpRequest)alert(xmlHttp1);

    alert(e.message);

    }

    }

    }catch(e){alert(e.message);}

    }


    ravishankar
    • Přesunutý Riquel_DongModerator 24. září 2008 8:49 ASP.NET issue (Moved from Visual Basic General to Off-Topic Posts (Do Not Post Here))
    19. září 2008 12:36

Všechny reakce