Note that there are some explanatory texts on larger screens.

plurals
  1. POmessage queuing + ajax not firing
    text
    copied!<p>I have created a php class which is pretty expensive and needs to process a lot of request on an admin page. For this reason I'm trying to using jquery queing + ajax calls to batch process the requests however the whole javascript is not firing and I don't understand why. I'm more of a PHP expert nog so much js or jQuery.</p> <p>The code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { window.queue = $.jqmq({ // Queue items will be processed every 250 milliseconds. delay: 500, // Process queue items one-at-a-time. batch: 10, // For each queue item, execute this function. callback: function (model, apit) { $.ajax({ url: 'script.php', type: "post", cache: false, data: "model=" + model + "&amp;api=" + apit, success: function (data) { $(".error_msg p").append(data); } }, // When the queue completes naturally, execute this function. complete: function () { $.ajax({ url: 'script.php', type: "post", cache: false, data: "cleanup=1", success: function (data) { $(".error_msg p").append(data); } $('.error_msg p').append('&lt;br /&gt;&lt;span class="done"&gt;Queue done&lt;\/span&gt;'); } }); //the next line is repeated a couple hundred times with different values queue.add('arg1', 'arg2'); queue.add('arg1', 'arg2'); }); &lt;/script&gt; </code></pre> <p>This code is located in the body. Scripts included (in the head) are:</p> <pre><code>&lt;script type="text/javascript" src="js/jquery-1.4.1.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.ba-jqmq.js"&gt;&lt;/script&gt; </code></pre> <p>I've checked with TamperData FF plugin and the ajax posts to script.php are just not firing and I have no idea why..</p>
 

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