1. Insert this code below head tag
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
</script>
2. And Form code change like this
<form action="" method="post" name="register">
<input name="submit" type="submit" value="register" style="width:100px;" onclick="$('#loading').show();">
</form>
<div id="loading" style="display:none;"><img src="ajax_progress2.gif" alt="" /></div>
Example:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
</script>
</head>
<body>
<br>
<form action="" method="post" name="register">
<label>username:</label><input name="name" type="text"><br>
<label>password:</label><input name="password" type="password"><br>
<label>email:</label><input name="email" type="text"><br>
<input name="submit" type="submit" value="register" style="width:100px;" onclick="$('#loading').show();">
</form>
<div id="loading" style="display:none;"><img src="ajax_progress2.gif" alt="" /></div>
</body>
</html>
Ajax loader images
0 Comments:
Post a Comment