Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

XMLHttpRequest - responseXML.text not Working In: Google Chrome , Firefox, Opera

$
0
0

Hello everybody.

I have a problem with XMLHttpRequest.

responseXML.text Works good With Internet Explorer

but not  Working In: Google Chrome , Firefox, Opera

I add link to my project. Please chack it:    http://www.loveburn.com/visitors/miclala/fil1.zip

Is any one know how to solve it?. 

code in javascript:<script language="javascript" type="text/javascript">

        ShowDataFromWebService();
        
        function ShowDataFromWebService() {

            var xhr = new XMLHttpRequest();
            var url = "WebService.asmx/HelloWorld";

            // GET באמצעות  Web Service - קריאה ל
            xhr.open("GET", url, true);
            xhr.onreadystatechange = function(response) {

                if (xhr.readyState == 4 && xhr.status == 200) {

                    // WebService  שחוזר מקריאה למתודה בתוך Hello World מציג בתןך תא בטבלה
                    if (document.getElementById("tdInfo").innerHTML != null) {
                        document.getElementById("tdInfo").innerHTML = xhr.responseXML.text;
                    }
                }

            }

            xhr.send();

          
        }
    
    </script>

 code in html:

<body><form id="form1" runat="server"><table border="1"<tr><td id="tdInfo" align="center" style="white-space:nowrap">&nbsp;</td></tr></table></form></body>


 code in WebService :

public class WebService : System.Web.Services.WebService {

  
    [WebMethod]
    public string HelloWorld() {
       
        return  "<h2>Hello World</h2>";
    }
}


 meir
.  


Viewing all articles
Browse latest Browse all 5678

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>