Note that there are some explanatory texts on larger screens.

plurals
  1. POgetJSON callback after uprade to jQuery 1.5 not called
    text
    copied!<p>Good day!</p> <p>I've running plugin on jQuery 1.4.4 with <code>getJSON()</code>, after uprade to 1.5 callback is not called. The returned JSON is valid (I've checked with validator).</p> <p>Before digging more I'd like to as if this a common problem? Also I noticed additional get parameter <code>?callback=...</code> which jQuery adds to the URL</p> <p>Thanks in advance!</p> <p><strong>Edit</strong>: It seems I figured out how to create a test case and it seems that JQuery validate 1.7 (latest version) is the cause:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" lang="ru"&gt; &lt;head&gt; &lt;title&gt; &lt;/title&gt; &lt;meta http-equiv="content-type" content="text/html; charset=utf8" /&gt; &lt;script type="text/javascript" src="js/jquery-1.5.min.js"&gt;&lt;/script&gt; &lt;!-- If I uncomment this - it will not work &lt;script type="text/javascript" src="js/jquery.validate.js"&gt;&lt;/script&gt; --&gt; &lt;/head&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; $(function(){ $.ajaxSetup({ cache: false }); $('#clickme').click(function(){ var params = {userid : 'some-user-id-to-choose-right-temp-FTP-folder-for-the-user'}; $.getJSON('/ajax-page_material-edit-ftp-filelist.php', params, function(data) { console.log(data); }); }); }); &lt;/script&gt; &lt;a href="#" id="clickme"&gt;Click Me!&lt;/a&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Maybe this code in plugin is the cause:</p> <pre><code>// ajax mode: abort // usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); // if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() ;(function($) { var ajax = $.ajax; var pendingRequests = {}; $.ajax = function(settings) { // create settings for compatibility with ajaxSetup settings = $.extend(settings, $.extend({}, $.ajaxSettings, settings)); var port = settings.port; if (settings.mode == "abort") { if ( pendingRequests[port] ) { pendingRequests[port].abort(); } return (pendingRequests[port] = ajax.apply(this, arguments)); } return ajax.apply(this, arguments); }; })(jQuery); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload