jquery 1.5 ajax requests are erroring

后端 未结 3 739
南方客
南方客 2021-01-26 05:12

trying to upgrade to jQuery 1.5 and all my ajax calls break. I\'m running firefox and it gives me a javescript error of invalid Label I\'m using php\'s json_encode here is my

相关标签:
3条回答
  • 2021-01-26 05:34

    Ok so I found the correct solution after some searching I found a bug report for the jQuery Validate. At the bottom of the report the author of validate provides a forked version which fixes the problem thanks to all for help

    0 讨论(0)
  • 2021-01-26 05:40

    Most probably it happens due to a bug in jquery.validate.js. There is a quick (not recommended!) fix jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null}); - if it works for you, look further into different options, there is a discussion of "Invalid Label" problem in version 1.5.

    0 讨论(0)
  • 2021-01-26 05:55

    This is a bug and it is fixed in 1.5.1. See ticket http://bugs.jquery.com/ticket/8125, You can find the latest jQuery release with up to date fixes at http://code.jquery.com/jquery-git.js

    You can also try jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null}); as per this thread JQuery 1.5 and new "Text JSON" datatype

    0 讨论(0)
提交回复
热议问题