Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>OK, finally looks like I found the reliable solution that based on the <a href="http://www.nczonline.net/blog/2009/07/28/the-best-way-to-load-external-javascript/" rel="nofollow">article</a>... here is the working example:</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dijit/themes/claro/claro.css" media="screen"&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function loadScript(url, callback) { var script = document.createElement("script") script.type = "text/javascript"; if (script.readyState) { //IE script.onreadystatechange = function () { if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; callback(); } }; } else { //Others script.onload = function () { callback(); }; } script.src = url; document.body.appendChild(script); } $(document).ready(function () { dojoConfig = { parseOnLoad: false, async: true }; loadScript("http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js", function () { /// Require the registry, parser, Dialog, and wait for domReady require(["dijit/registry", "dojo/parser", "dojo/json", "dojo/_base/config", "dijit/Dialog"], function (registry, parser, JSON, config) { // Explicitly parse the page parser.parse(); // Find the dialog var dialog = registry.byId("dialog"); // Set the content equal to what dojo.config is dialog.set("content", "&lt;b&gt;it works!&lt;/b&gt;"); // Show the dialog dialog.show(); }); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body class="claro"&gt; &lt;div id="dialog" data-dojo-type="dijit.Dialog"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>It's not pure jQuery solution but it's better for me then include Dojo script on the page...</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