Advertisement
adam-prescott

AJAX Sample

Feb 7th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var price = "10.99";
  2. $.ajax({
  3.   type: "POST",
  4.   url: "some.php?action=updateprice",
  5.   data: "price="+price,
  6.   success: function(data) {
  7.     alert("HELL YEH, IT WORKED");
  8.   },
  9.   error: function(data) {
  10.     alert("OHHH NOO!!!");
  11.   }
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement