Created
August 16, 2013 19:34
-
-
Save christianselig/6252860 to your computer and use it in GitHub Desktop.
This file contains 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
$(document).ready(function() { | |
$('input[type="submit"]').click(function() { | |
event.preventDefault(); | |
var email = $('.email').val(); | |
$.ajax({ | |
type: "POST", | |
url: "register_email.php", | |
dataType: "json", | |
data: { email: email }, | |
success: function(data) { | |
alert(data.email); | |
}, | |
error: function(jqXHR, textStatus, errorThrown) { | |
alert(textStatus + " " + errorThrown); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment