Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The browser executes scripts in the order they're loaded, not written. Your <strong>immediate</strong> scripts -- <code>tinyMCE.init(...)</code> and <code>$(document.ready(...));</code> -- can execute before the files finish loading.</p> <p>So, the problem is probably network latency -- especially with 6 separate scripts (each requiring a different HTTP conversation between the browser and server). So, the browser is probably trying to execute <code>tinyMCE.init()</code> before <strong>tiny_mce.js</strong> has finished being parsed and <code>tinyMCE</code> is fully defined.</p> <p>If don't have Firebug, <a href="https://addons.mozilla.org/en-US/firefox/addon/1843" rel="nofollow noreferrer">get it</a>. ;)<br> It has a <strong>Net</strong> tab that will show you how long it's taking all of your scripts to load.</p> <hr> <p>While you may consider the <code>setTimeout</code> to be duct taping, it's actually a decent solution. Only problem I see is that it assumes 1 second will always fix. A fast connection and they could see the pause. A slow connection and it doesn't wait long enough -- you still get the error.</p> <p>Alternatively, you might be able to use <code>window.onload</code> -- assuming jQuery isn't already using it. (Can anyone else verify?)</p> <pre><code>window.onload = function () { tinyMCE.init(...); $(document).ready(...); }; </code></pre> <hr> <p>Also, was that a direct copy?</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ /* jQuery initialization */ } &lt;/script&gt; </code></pre> <p>It's missing the <code>)</code> ending <code>ready</code>:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ /* jQuery initialization */ }) &lt;/script&gt; </code></pre> <p>Missing punctuation can cause plenty of damage. The parser is just going to keep reading until it finds it -- messing up anything in between.</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