title: Unable to consume WCF service by Java Script using XmlHttpRequest
body: <p>Here is my java script to call WCF service</p>
  
  <pre><code> function CallWcfAjax() {
            var xmlhttp = new XMLHttpRequest();
  
             var url = "http://localhost:20949/RestService/tiger/pandey";                    
  
             // Send the HTTP request
             xmlHttp.open("GET", url, true);
             xmlhttp.send();           
  
             // Create result handler 
             xmlHttp.onreadystatechange = function X() {                   
                 if (xmlHttp.readyState == 4) {
                     alert(xmlHttp.responseText);
                 }
             }
         }
  </code></pre>
  
  <p>if I enter the same URL in browser <a href="http://localhost:20949/RestService/tiger/pandey" rel="nofollow">http://localhost:20949/RestService/tiger/pandey</a> i get a response.</p>
  
  <p>Any idea what wrong I am doing in Java Script?</p>
  
  <p>Thanks</p>