Skip to content

Instantly share code, notes, and snippets.

@gavinblair
Created September 15, 2010 17:20
Show Gist options
  • Save gavinblair/581084 to your computer and use it in GitHub Desktop.
Save gavinblair/581084 to your computer and use it in GitHub Desktop.
$.ajax({
url: '/myphpajaxpath',
type: 'post',
data: 'postvar=1&postvar2=2&postvarthree=3',
succes: function(msg) {
alert("yay!"+msg);
},
error: function(msg) {
console.log("An error occurred: "+msg);
}
});
@SeanJA
Copy link

SeanJA commented Sep 15, 2010

but... why not $.post and $.get?

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