Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax call back not called. How to tackle this?
    text
    copied!<p>Again I am here for your suggestions. I have some AJAX call for running code from my editor which is a PHP online editor. (You guys can check in <a href="http://web.guru99.com/" rel="nofollow">my site</a>.)</p> <p>I have some ajax call for send the data of editor and received output. </p> <p>Problem: for loop not executed properly. </p> <ol> <li><p>Below for loop program is executed successfully</p> <pre><code>&lt;?php for($i=10;$i&gt;1;$i--){ echo "$i&lt;br&gt;"; } ?&gt; </code></pre></li> <li><p>While this for loop is not executed </p> <pre><code>&lt;?php for ($x=0; $x&lt;=10; $x++) { echo "The number is: $x &lt;br&gt;"; } ?&gt; </code></pre></li> </ol> <p>When I run this through FireBug, I get a response saying that the for loop has become an infinite loop in case of second loop (above).</p> <p>Now here is my AJAX callback:</p> <pre><code>$.ajax({ type: 'GET', url: 'exec.php', data: code, success: function(data) { alert(data); $(loader).addClass("hidden"); var stdout = $(form).children('.stdout'); if (data.search("Parse error")&gt;0) { var str = data.replace("&lt;b&gt;Parse error&lt;/b&gt;: ",""); $(stdout).html(str); $(stdout).removeClass('hidden'); } else { $(stdout).html(data); $(stdout).removeClass('hidden'); } }, error: function(req, status, err) { alert(status); alert(err); }, dataType: 'JSONP' }); </code></pre> <p>I have re-implemented this editor locally and run it; In FireBug I am getting this error:</p> <blockquote> <p>Error: jQuery110106354119750428449_1386321122498 was not called</p> </blockquote> <p>here is my JSON callback code from the server: </p> <pre><code>echo $_GET['callback']."(".json_encode($script_output).");"; </code></pre> <p>Please help me to tackle this error.</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