Skip to content

Instantly share code, notes, and snippets.

@paulohp
Created October 31, 2012 15:52
Show Gist options
  • Save paulohp/3987837 to your computer and use it in GitHub Desktop.
Save paulohp/3987837 to your computer and use it in GitHub Desktop.
$('#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;
});
@MahmudulHasanArif14
Copy link

Hi

@MahmudulHasanArif14
Copy link

banner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment