Still stuck on my php calling javascript problem. Please help in this
<p>Still stuck on my PHP calling a JS script problem </p>

<p>On the click of a button this Javascript is called:</p>

<pre><code>var xmlhttp;
function register()
{   
 xmlhttp=GetXmlHttpObject();
 alert("pass");
 if(xmlhttp==null)
 {
  alert("Your browser does not support AJAX!");
  return;
 }
 var url="register.php";
 url=url+"?id="+uniqueid+"&amp;name="+name+"&amp;passwrd="+passwrd1+"&amp;email="+email;
 xmlhttp.onreadystatechange=statechanged;
 xmlhttp.open("GET", url, true);
 xmlhttp.send(null); 
}

function statechanged()
{
    //alert("statechanged function");
    if(xmlhttp.readyState==4)
    {
     //alert(xmlhttp.responseText);
     document.getElementById("response").innerHTML=xmlhttp.responseText;
    }
}

function GetXmlHttpObject()
{
    if(window.XMLHttpRequest)
    {
     return new XMLHttpRequest();
    }
    if(window.ActiveXObject)
    {
     return new ActiveXObject("Microsoft.XMLHTTP");
    }
    return null;
}

function testing()
{
    document.getElementById("mainbody").innerHTML="This is my first JavaScript!";
}
</code></pre>

<p>And then this PHP script is called:</p>

<pre><code>&lt;?php
    echo "&lt;script type=\"text/javascript\"&gt;testing();&lt;/script&gt;";
?&gt;
</code></pre>

<p>The HTML has two <code>DIV</code> tags with IDs of <code>mainbody</code> and <code>response</code>:</p>

<pre><code>&lt;HTML&gt;
&lt;HEAD&gt;
&lt;SCRIPT SRC=javascriptname.js&gt;&lt;/SCRIPT&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
  &lt;DIV ID=mainbody&gt;
     &lt;DIV ID=response&gt;
     &lt;/DIV&gt;
  &lt;/DIV&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>

<p>I am unable to call the javascript from my php. 
If anyone know what am i doing wrong, or has a idea what should i do, it will be very helpful. </p>

<p>Thank you
Zeeshan</p>
