Note that there are some explanatory texts on larger screens.

plurals
  1. PODojo dialog appearing as static web page
    text
    copied!<p>I am attempting to code a simple example of a Dojo dialog box. I have copied the example shown in the Dojo reference here => <a href="http://dojotoolkit.org/reference-guide/1.7/dijit/Dialog.html" rel="nofollow">http://dojotoolkit.org/reference-guide/1.7/dijit/Dialog.html</a></p> <p>My code is shown below:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt; &lt;title&gt;Dialog Test&lt;/title&gt; &lt;script language="JavaScript" type="text/javascript"&gt; dojo.require("dojo.parser"); dojo.require("dojox.widget.Dialog"); dojo.require("dijit.form.Button"); dojo.require("dijit.layout.TabContainer") dojo.require("dijit.layout.ContentPane") &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="dialogOne" dojoType="dojox.widget.Dialog" title="My Dialog Title"&gt; &lt;div dojoType="dijit.layout.TabContainer" style="width: 200px; height: 300px;"&gt; &lt;div dojoType="dijit.layout.ContentPane" title="foo"&gt;Content of Tab "foo"&lt;/div&gt; &lt;div dojoType="dijit.layout.ContentPane" title="boo"&gt;Hi, I'm Tab "boo"&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;When pressing this button the dialog will popup:&lt;/p&gt; &lt;button id="buttonOne" dojoType="dijit.form.Button"&gt;Show me! &lt;script type="dojo/method" event="onClick" args="evt"&gt; // Show the Dialog: dijit.byId("dialogOne").show(); &lt;/script&gt; &lt;/button&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>When the page loads in a browser, the Dialog doesn't work. I just see the text from the tabbed panes appear in the browser.</p> <p>I've copied the code from the reference guide exactly so I'm very confused. Any suggestions?</p> <p>Thanks.</p> <p>James.</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