jquery post

Use html5 to validate email before submit.

 
<html>
 
<head>
 
<script>
function save()
{        
 
        jQuery('#b2').attr("disabled", true);
        jQuery('#msg').html("Working. Please wait....");
 
        var query = jQuery('#forget').serialize();
        var url = '/bw_forget_password_jquery.php';
        jQuery.post(url, query, function (response) {
            jQuery('#msg').html(response);
            jQuery('#b2').removeAttr("disabled");
        });
        return false;
 
 
}
</script>
</head>
<body>
<form method="POST" id='forget' onsubmit="return save();" action="#">
<br>Forget your username/password? Simply type your email address below and click Submit and you will receive them in an email.<br>
<input type="email" name="email" size="25">
<input type="submit" value="Submit" id="b2">
<div id = 'msg'></div>
</form>
</body>
</html>
Share

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)