PHP Classes

File: assets/js/Signin.signup.js

Recommend this page to a friend!
  Classes of harold rita   PHP Thesis Proposal Hub   assets/js/Signin.signup.js   Download  
File: assets/js/Signin.signup.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Thesis Proposal Hub
Store and publish research thesis documents
Author: By
Last change:
Date: 6 years ago
Size: 2,332 bytes
 

Contents

Class file image Download
$(function() { $('#formsignup').submit(function(e){ e.preventDefault(); e.stopPropagation(); var fname = $("#firstname").val(); var lname = $("#lastname").val(); var email = $("#email").val(); var password = $("#password").val(); var confirmPassword = $("#confirmPassword").val(); if(password === confirmPassword){ var url = "<?=site_url('signup');?>"; $.ajax({ url: url, type: "POST", data: 'firstname='+fname+'&lastname='+lname+'&email='+email+'&password='+password+'&confirmPassword='+confirmPassword, dataType: "html", success: function(data){ /*$('.signuperror').html(''); $('.signuperror').addClass('alert alert-success'); $('.signuperror').append(email);*/ alert(data); return false; } }); }else{ $('.signuperror').html('<i class="alert alert-warning">Sorry! Password do not match.</i>') return false; } }); $('#confirmPassword').keyup(function(){ var p = $('#password').val(); var cp = $('#confirmPassword').val(); if(cp === ""){ $('#password').removeClass('red'); $('#confirmPassword').removeClass('red'); } else if(p === cp){ $('#password').removeClass('red'); $('#confirmPassword').removeClass('red'); }else{ $('#password').addClass('red'); $('#confirmPassword').addClass('red'); } }); $('#password').keyup(function(){ var p = $('#password').val(); var cp = $('#confirmPassword').val(); if(p === ""){ $('#password').removeClass('red'); $('#confirmPassword').removeClass('red'); $('#confirmPassword').val(''); } }); });