Created
April 4, 2015 12:40
-
-
Save madeinnordeste/efca5df686f87dd16424 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*One: */ | |
var data = $("#emailaddress:input").serialize(); | |
//maybe is not necessary use serialize() method; | |
var data = $("#emailaddress").val(); | |
/*Two:*/ | |
//to submit for php script you can use: | |
var data = $("#emailaddress:input").serialize(); | |
var params = {email: data} | |
$.post( "bryte-verify.php", params) | |
.done(function( data ) { | |
alert( "Data Loaded: " + data ); | |
}); | |
/*Three:*/ | |
//After submit email address, is necessary handle te return to validate or not the email adress submited, ex: | |
var data = $("#emailaddress:input").serialize(); | |
var params = {email: data} | |
$.post( "bryte-verify.php", params) | |
.done(function( data ) { | |
if( data.email.status == 'valid' ){ | |
alert('valid email') | |
/* other actions */ | |
}else{ | |
alert('invalid email'); | |
/*other actions*/ | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment