开发者

jQuery form plugin success callback not being called

开发者 https://www.devze.com 2023-03-23 13:02 出处:网络
I\'m using the jQuery form plugin and when I use ajaxSubmit, the submission does happen (I checked for the 200 response) but the success callback is not called because I\'m not seeing the alert(). Doe

I'm using the jQuery form plugin and when I use ajaxSubmit, the submission does happen (I checked for the 200 response) but the success callback is not called because I'm not seeing the alert(). Does 开发者_开发问答anyone have any ideas as to why this is happening?

$("#edit-form form").submit(function() {
    $(this).ajaxSubmit({
        success: function(data){ 
          alert("here")
        },
        method: "POST",
        datatype: "json",
        forceSync: true
      });
    return false;
  });

EDIT: forgot to mention that the form is in an iframe (idk if that'll make a difference or not) created by a fancybox.

0

精彩评论

暂无评论...
验证码 换一张
取 消