Ajax post being aborted by firefox (not seen in Chrome or IE)

前端 未结 8 498
再見小時候
再見小時候 2020-12-06 04:37

When using firefox, an ajax post request i have is being reported as aborted in firebug. The ajax post works fine in IE and Chrome. It is not a cross domain request. I tr

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-06 05:38

    I also had similar issues and tried some of the ideas described above. I finally fixed "aborted" state by :

    1. adding e.preventDefault(); and return false; to buttons event handlers
    2. adding datatype: "json", contentType: "application/json", to jQuery.ajax method params.

    Thx to everyone for the clues.

提交回复
热议问题