File "ajax.htm"
Full Path: /home/analogde/www/Virtual/ok/ajax.htm
File size: 1.28 KB
MIME-type: text/html
Charset: utf-8
<html>
<head>
<title>User Login</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<script>
function callLogin()
{
var userName = document.getElementById("userName").value;
var password = document.getElementById("password").value;
xmlHttpRequest=new XMLHttpRequest();
xmlHttpRequest.onreadystatechange=function() {
if (xmlHttpRequest.readyState==4 && xmlHttpRequest.status==200) {
document.getElementById("messageBoxId").innerHTML=xmlHttpRequest.responseText;
}
}
xmlHttpRequest.open("GET","sign.php?user="+userName+"&password="+password,true);
xmlHttpRequest.send();
}
</script>
</head>
<body>
<form name="frmUser" method="post" action="">
<div id="loginDivId">
<div class="message" id="messageBoxId"></div>
<table border="0" cellpadding="10" cellspacing="1" width="500" align="center">
<tr class="tableheader">
<td align="center" colspan="2">Enter Login Details</td>
</tr>
<tr class="tablerow">
<td align="right">Username</td>
<td><input type="text" name="userName" id="userName"></td>
</tr>
<tr class="tablerow">
<td align="right">Password</td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr class="tableheader">
<td align="center" colspan="2"><input type="button" name="submit" value="Login" onClick="callLogin();"></td>
</tr>
</table>
</div>
</form>
</body>
</html>