Rolf Kremer

Posts Tagged ‘Dojo

Dojo Toolkit and XHTML

with 2 comments

I had added > Dojo widgets to a website. After that, the markup was not > XHTML valid. I searched the internet and found a following solution for that problem. The main problem is, that you can use Dojo-specific html tags. Examples:

  • If you configure the Dojo parser, you can add the ‘djConfig’ tag, which is unknown by the XHTML dtd. For example, you can add ‘djConfig=”parseOnLoad:false’.
  • If you use widgets, you have the possibility to define the widgets via markup. The tag ‘dojoType’ is also unknown by the XHTML DTD.

Instead of using the markup tags, you have to add the widgets programmatically. The following script is an excerpt which shows, how a dialog can be added programmatically without damage the XHTML validation. It shows the page “dialog.html” in the dialog, if the user clicks on a link.

1. Load the Dojo javascript and css files:

<head>
<script type="text/javascript" src="http://.../dojo/dojo.xd.js" ></script>
<link type="text/css" rel="stylesheet" href="http://.../tundra.css"/>

2. Define the dialog in the addOnLoad event:

<script type="javascript">
  dojo.require("dijit.Dialog");
  dojo.addOnLoad(function() {
     // create the dialog
     dialog = new dijit.Dialog({
        id: "dialog",
        style: "width: 200px; height: 240px;"
    });
  });

3. Define a javascript function to call the dialog and set the attributes:

  function showDialog() {
     dialog.attr("title", "Dialog Title");
     dialog.attr("href", "dialog.htm");
     dialog.show();
  }
</script>

</head>

<body>
...

4. Add the link to open the dialog:

<a href="javascript:showDialog();">Click on me</a>
...
</body>

Finally, you can verify the page with the > Unicorn validator.

Written by rkremer

September 19, 2010 at 4:33 pm

Posted in Development

Tagged with ,

Version 1.5 of Dojo Toolkit is out

with one comment

Since Thursday the new version 1.5 of the > Dojo Toolkit is available. The main improvement is a complete new theme, called Claro. Further, many Html5 and CSS3 features are supported. Some new projects for mobile apps are available, too. You get a good overview about the changes by reading the article > Dojo 1.5: Ready to power your web app on the SitePen website and by reading the > Release Notes. You can download the version on the > Dojo download page.

Written by rkremer

July 25, 2010 at 12:20 am

Posted in Development

Tagged with

New Dojo Release 1.4.1

leave a comment »

A new release 1.4.1 of the Dojo toolkit is available. Further, the > Dojo website has a new layout.

Download page > http://download.dojotoolkit.org/

Written by rkremer

February 3, 2010 at 8:40 pm

Posted in Development

Tagged with

Support for the Dojo Toolkit

leave a comment »

The Dojo Toolkit forum is down since months. If you work with Dojo you can get support via the > mailing list. I have subscribed and get a lot of e-mails every day. Another possibility is to use > Stack Overflow. There are several questions and answers available. Further, you can search on the > DojoCampus site.

Written by rkremer

January 14, 2010 at 7:13 pm

Posted in Development

Tagged with

Dojo 1.3 is available

leave a comment »

Since today the new > Dojo Toolkit 1.3.0 version is available. It contains several > changes, especially the Tree and Menu widgets were updated. Further it supports the new web browsers Internet Explorer 8 and Google Chrome.

Written by rkremer

March 31, 2009 at 8:31 pm

Posted in Development

Tagged with