Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- $("input#register_btn").click(function(){
- $('.error').hide();
- var user = $('input#user').val();
- if(user == ""){
- $('.error').show();
- $('.error').html("Username cannot be blank. Please use the username you login with.");
- $("input#user").focus();
- return false;
- }
- var pass = $('input#pass').val();
- if(pass == ""){
- $('.error').show()
- $('.error').html('Password cannot be blank. Please enter something.')
- $("input#pass").focus();
- return false;
- }
- var pass2 = $('input#pass_confirm').val();
- if(pass2 == ""){
- $('.error').show()
- $('.error').html('Password cannot be blank. Please enter something.')
- $("input#pass2").focus();
- return false;
- }
- if(pass2 != pass){
- $('.error').show()
- $('.error').html('The passwords you entered do not match. Please reenter them.')
- $("input#pass").focus();
- return false;
- }
- var email = $('input#email').val();
- if(email == ""){
- $('.error').show()
- $('.error').html('Email address cannot be blank.')
- $("input#email").focus();
- return false;
- }
- form.submit();
- });
- });
Add Comment
Please, Sign In to add comment