All pastes #330982 Raw Edit

Anonymous

public text v1 · immutable
#330982 ·published 2007-01-28 13:18 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<script type="text/javascript">
function searchUser(username)
  {
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    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 () { function searchReturn(xmlHttp); };
	
	xmlHttp.open("GET","search.php?username="+username,true);
	xmlHttp.send(null);
  }
  
  function searchReturn(xmlHttp)
	{
		 if (xmlHttp.readyState==4) {
		 	alert(xmlHttp.responseText);
		 }
	}
</script>

<form name="method">
Find a username:<br />
<input type="text" name="username" onkeyup="searchUser(this.value)"/>
</form>
</body>
</html>