Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:34:34+00:00 2026-06-17T21:34:34+00:00

I am attempting to code a simple example of a Dojo dialog box. I

  • 0

I am attempting to code a simple example of a Dojo dialog box. I have copied the example shown in the Dojo reference here => http://dojotoolkit.org/reference-guide/1.7/dijit/Dialog.html

My code is shown below:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Dialog Test</title>
        <script language="JavaScript" type="text/javascript">
                dojo.require("dojo.parser");
                dojo.require("dojox.widget.Dialog");
                dojo.require("dijit.form.Button");
                dojo.require("dijit.layout.TabContainer")
                dojo.require("dijit.layout.ContentPane")
        </script>
    </head>
    <body>
        <div id="dialogOne" dojoType="dojox.widget.Dialog" title="My Dialog Title">
            <div dojoType="dijit.layout.TabContainer" style="width: 200px; height: 300px;">
                <div dojoType="dijit.layout.ContentPane" title="foo">Content of Tab "foo"</div>
                <div dojoType="dijit.layout.ContentPane" title="boo">Hi, I'm Tab "boo"</div>
            </div>
        </div>
        <p>When pressing this button the dialog will popup:</p>
        <button id="buttonOne" dojoType="dijit.form.Button">Show me!
            <script type="dojo/method" event="onClick" args="evt">
                // Show the Dialog:
                dijit.byId("dialogOne").show();
            </script>
        </button>
    </body>
</html>

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.

I’ve copied the code from the reference guide exactly so I’m very confused. Any suggestions?

Thanks.

James.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:34:35+00:00Added an answer on June 17, 2026 at 9:34 pm

    The Dojo samples unfortunately tend not to work fully ‘as is’, but are bits of skeleton code that need wrapping up in various standard bits of ceremony.

    You’ve at least three things causing this not to work and render correctly. There may be other problems on top, but these will definitely cause it not to render:

    1. You need to link to a version of the core Dojo scripts. Linking to a CDN version is a simple way to go. e.g. <script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js"></script>. Details are here: http://dojotoolkit.org/download/. Be sure to put this before your require scripting.
    2. Add a link to a Dijit theme style sheet (CSS file) in your page, otherwise none of the widgets will display correctly. e.g. <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dijit/themes/claro/claro.css‌​"/>
    3. Add a class attribute on the body element describing which theme you want to use. e.g. <body class="claro">.

    Only when you’ve done all those three things will it have a chance of working. There may be other problems too, but they’re the fundamental three.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple enough example - I have a bit of Django code that starts with
I'm attempting to do a simple bubble sort code to get familiar with list/string
I'm attempting to code Box and Whiskers graphs in html. The issue is, I
We have a scenario where some .NET code is attempting to access the current
I am attempting to use the code found in the answer here: Directory.Move doesn't
I am attempting to take simple number ranges (in the example of this project,
I'm attempting to create a simple example that would just alert the first 5
I'm attempting to run the simple example in the doSMP vignette, but get the
I am attempting to build a simple application using wicket and have been impressed
I'm using this android calendar http://w2davids.wordpress.com/android-simple-calendar/ and attempting to populate it with events. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.