Created
October 31, 2012 15:52
-
-
Save paulohp/3987837 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
$('#contact-form').submit(function() { | |
var _nome = $('#message_name') | |
var _email = $('#message_email') | |
var _assunto = $('#message_subject') | |
var _body = $('#message_body') | |
var valuesToSubmit = { | |
nome: _nome, | |
email: _email, | |
assunto: _assunto, | |
body: _body | |
} | |
$.ajax({ | |
type: "POST", | |
url: "/contacts", | |
data: valuesToSubmit, | |
success : function(){alert("broga")}, | |
error : function() {alert(valuesToSubmit)} | |
}); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi