Skip to content

Instantly share code, notes, and snippets.

@house9
Created August 21, 2009 19:26
Show Gist options
  • Save house9/172347 to your computer and use it in GitHub Desktop.
Save house9/172347 to your computer and use it in GitHub Desktop.
jquery ajax post
$j.ajax({
type: "POST",
url: "/some_controller/some_action",
data: {
first_name: $j("#first_name").val(),
last_name: $j("#last_name").val(),
},
success: function(data, textStatus) {
// do what you like
},
error: function(result) { defaultAjaxErrorHandler(result, true); }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment