Problem getting the response from php in a new location
<p>Currently the location of my Html is 
<a href="http://severname.com/qotw.html" rel="nofollow">http://severname.com/qotw.html</a>. Onclick of a button i call the login();</p>

<p>the login() javascript function, looks like this:</p>

<pre><code>function login()
{  
  passwrd = document.f_signin.password.value;
  username = document.f_signin.username.value;

  if (username==""){ document.getElementById("response").innerHTML="&lt;font color='red'&gt;Enter your User Name to login.&lt;/font&gt;";}
  else if (passwrd==""){ document.getElementById("response").innerHTML="&lt;font color='red'&gt;You did not enter your password. Enter your password and try again.&lt;/font&gt;";}

  if (passwrd!="" &amp;&amp; username!="")
  {    
    xmlhttp=GetXmlHttpObject();
    //alert("pass");
    if(xmlhttp==null)
    {
      alert("Your browser does not support AJAX!");
      return;
    }
    var url="login.php";
    url=url+"?id="+username+"&amp;passwrd="+passwrd;
    xmlhttp.onreadystatechange=statechangedLogin;
    xmlhttp.open("GET", url, true);
    xmlhttp.send(null);
  }
}

function statechangedLogin()
{
  //alert(xmlhttp.readyState);
  if(xmlhttp.readyState==4)
  {
    if(xmlhttp.responseText=="&lt;font color='red'&gt;Your User Name or Password is incorrect. Please try again.&lt;/font&gt;")
    {
      document.getElementById("response").innerHTML=xmlhttp.responseText;
    }
    else 
    {
      document.location="http://servername.com/login.php";
      //document.getElementById("mainbody").
      document.innerHTML=xmlhttp.responseText;
    }
  }
}
</code></pre>

<p>I want to display the response from login.php in the location "http://severname.com/login.php"</p>

<p>How should i do this? The location of the page changes from qotw.html to login.php, but the login.php does not displays anything inside it. </p>

<p>Zeeshan</p>
