title: how to get content of a page in another server
body: <p>hi actually i am trying to get the content of any page which is provided...i am able to content if the page is in same server if i provide another server name its not working.i know we can easily achieve in jquery but i need it in js only... below the code i using...   </p>
  
  <pre><code>&lt;script&gt;
   function loadXMLDoc()
   {
    var xmlhttp;
   if (window.XMLHttpRequest)
       {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
       }
     else
      {// code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
      xmlhttp.onreadystatechange=function()
       {alert(xmlhttp.status);
        if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
        {
      //alert("SADF");
          document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
            }
       }
    var url=document.getElementById("url").value;
  
    xmlhttp.open("GET",url,true);
      xmlhttp.send();
      }
       &lt;/script&gt;
  
  &lt;div id="myDiv"&gt;&lt;/div&gt;
  &lt;input type="text" name="url" id="url"/&gt;
  &lt;button type="button" onclick="loadXMLDoc()"&gt;Change Content&lt;/button&gt;
  </code></pre>
  
  <p>thanks in advance...</p>