Skip to content

Instantly share code, notes, and snippets.

@bran921007
Forked from jhonnrodr/post ajax
Last active December 14, 2015 00:06
Show Gist options
  • Save bran921007/f826f0dbfeb2282a2930 to your computer and use it in GitHub Desktop.
Save bran921007/f826f0dbfeb2282a2930 to your computer and use it in GitHub Desktop.
Post Ajax Jquery
$.ajax({
type: "POST",
url: "/NewEmail",
data: { username: username }
}).done(function(data){
if(data.success == false){
var errores = '';
for(datos in data.errors){
errores += '<small >' + data.errors[datos] + '</small>';
}
$('#danger').fadeIn("fast").html(errores);
}else{
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment