<?php

require_once 'ajax.php';


$ajax->keyup('username', $ajax->call('ajax.php?ajax_login/user/|username|','span_container'));
	


$code = $ajax->code("
\$ajax->keyup('username', \$ajax->call('ajax.php?ajax_login/user/|username|','span_container'));
");

$ajax->click('code', $ajax->overlayContent($code,array('width'=> '1000px','top'=>50)));
?>
<html>
<head>
<title>Check Username</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<link rel="stylesheet" type="text/css" href="resources/send_form/view.css" media="all">
	<script type="text/javascript" src="resources/send_form/view.js"></script>
<?php echo $ajax->init();?>
</head>
<style>
#login_bar {
	height: 60px;
	width: 100%;
	font-family: verdana;
}

#login_div {
	width: 100%;
	float: right;
	font-size: 36px;
	position:relative;
}

#a_login  {
	 font-size: 20px;
}
</style>
<body>
<h2>Check Username</h2>
<br />
<div id='login_bar'>
	<div id='login_div'></div>
</div>
Simple way to check if username is available. One single line of code.
<br />
<a id='code' href="#">View Code Used</a>
<br />
<br />
To test, type in a username in the username field.
<br />
<br />
<div id="main_body" >
	<img id="top" src="resources/send_form/top.png" alt="">
	<div id="form_container">
	
		<h1><a>Send form to server using ajax..</a></h1>

		<form id="form1" name="form1" class="appnitro"  method="post" action="">
		<div class="form_description">
			<h2>Registration Form</h2>
		</div>						
		<ul>
		<li id="li_2" >
			<label class="description" for="element_2">Username </label>
	
			<span>
				<input id="username" name="a[username]" class="element text" maxlength="255" size="26" value=""/>
				<label>Username</label>
			</span><span id='span_container' style='color:green'></span>
		</li>
		<li id="li_3" >
		<label class="description" for="element_2">Password </label>
	
			<span>
				<input id="password" name="a[password]" class="element text" maxlength="255" size="8" value=""/>
				<label>Password</label>
			</span>
			<span>
				<input id="repeat_password" name="a[repeat_password]" class="element text" maxlength="255" size="14" value=""/>
				<label>repeat-password</label>
			</span> 
		</li>		
		<li id="li_4" >

		<label class="description" for="element_4">Drop Down </label>
		<div>
		<select class="element select medium" id="a[drop_down]" name="a[drop_down]"> 
			<option value="" selected="selected"></option>
			<option value="1" >First option</option>
			<option value="2" >Second option</option>
			<option value="3" >Third option</option>
		</select>

		</div> 
		</li>		
		<li id="li_1" >
		<label class="description" for="element_1">Country </label>
		<div>
			<input id="a[country]" name="a[country]" class="element text medium" type="text" maxlength="255" value=""/> 
		</div> 
		</li>		<li id="li_3" >
		<label class="description" for="element_3">State </label>

		<div>
			<input id="a[state]" name="a[state]" class="element text medium" type="text" maxlength="255" value=""/> 
		</div> 
		</li>
			</ul>
		</form>	
		<div id="footer">
			Generated by <a href="http://www.phpform.org">pForm</a>
		</div>
	</div>
	<img id="bottom" src="resources/send_form/bottom.png" alt="">
</div>
</body>
</html>