code_junkie

jQuery's ajax is causing a full page refresh in FireFox

Nov 14th, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. $.ajax({
  2. async: false,
  3. type: "POST",
  4. url: "Default.aspx/DoSomething",
  5. data: "{" + parms + "}",
  6. contentType: "application/json; charset=utf-8",
  7. dataType: "json",
  8. cache: false,
  9. success: function(data) { succesfulPost(data); },
  10. error: function(XMLHttpRequest, textStatus, errorThrown) { errorPost(textStatus, errorThrown); }
  11.  
  12. <input type="submit" onclick="doAjaxSubmit();return false;" value="Update" />
Add Comment
Please, Sign In to add comment