title: JavaScript returned by AJAX is not working. How to work with JavaScript?
body: <p>this is my page Test1.asp</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Language" content="en-us"&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
  &lt;title&gt;New Page 1&lt;/title&gt;
  &lt;script type="text/javascript"&gt;
  function Alex()
  {
  var xmlHttp;
  try
    {  
    xmlHttp=new XMLHttpRequest();  }
  catch (e)
    { 
     try
      {    
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");   
       }
    catch (e)
      {   
       try
        {     
         xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");   
            }
      catch (e)
        {      
        alert("Your browser does not support AJAX!");      
        return false; 
             }    
             } 
              }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
        document.getElementById("Alex").innerHTML =xmlHttp.responseText;//Get Google Destination Map 
        }
      }
      xmlHttp.open("GET","Test2.asp" ,true);
      xmlHttp.send(null); 
     }
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div id ="Alex"&gt;&lt;/div&gt;
  &lt;label onclick="Alex()" &gt;ssss&lt;/label&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is requested page Test2.asp</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
  &lt;title&gt;New Page 1&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="Mathew"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;script type="text/javascript" &gt;
  {
  document.getElementById("Mathew").innerHTML='ajax is working';      
  }
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the page (Test2.asp) javascript is not working</p>
  
  <p>How do i call test2.asp to my test1.asp using ajax</p>