Form submitted multiple times when using the “submit” callback and $.ajax to post it

后端 未结 8 1508
闹比i
闹比i 2020-12-14 17:50

I\'ve been observing some strange behavior with the following code:

$.fn.submit_to_remote = function() {
  // I use .each instead of the .submit directly so          


        
8条回答
  •  再見小時候
    2020-12-14 18:14

    OpenCart double submit happens because there is a submit bind in common.js.

    Avoid this by using an id pattern for the form that does not match "form-".

    Example:

    .

提交回复
热议问题