Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you are describing assumes that dojo itself has already been loaded by the time that the modal <code>dijit.Dialog</code> appears with the loading message.</p> <p>Now, normally, dojo starts executing once your page is fully loaded, and you would normally put your dojo code inside an anonymous function passed as parameter of <code>dojo.addOnLoad()</code>.</p> <p>That entails that the remaining part of your page (what you call your "links") will have to be loaded through ajax (using, for instance, <code>dijit.layout.ContentPane</code>). That way, dojo can execute before the content is downloaded, and your "waiting" message can appear earlier.</p> <p>It might look like this:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;link rel="stylesheet" href="/dojo/dijit/themes/tundra/tundra.css" type="text/css" media="screen" /&gt; &lt;script type="text/javascript" src="/dojo/dojo.js" djConfig="parseOnLoad:true"&gt;&lt;/script&gt; /* make sure that you shrinksafe together your libraries and dojo's for faster loading... */ &lt;script type="text/javascript" src="/dojo/yourOwnDojoCompressedScripts.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var dialog; dojo.addOnLoad(function(){ dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.Dialog"); dialog = new dijit.Dialog(); dialog.setContent("&lt;p&gt;This page will be available in a tick!&lt;/p&gt;"); dialog.show(); }); &lt;/script&gt; &lt;/head&gt; &lt;body class="tundra"&gt; &lt;div id="delayedContent" dojoType="dijit.layout.ContentPane" href="/myContentUrl" onLoad="dialog.hide()"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The only flaw in that plan is dojo itself: expect your <em>shrinksafed</em> library to weigh over 90K (possibly up to 300K, depending on how much stuff you put in there). On a slow connection, that still takes a noticeable amount of time to download. That said, we're talking of a <em>static</em> 90K --- the same user will download it only once per session, and even less often than that if you take the time to set appropriate cache/expire headers when those static files are served.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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