|
| UI Markup
Markup Embedded in a Script tag
This sample show how to use the dojo.E UI functionality. The dojo.E UI
is created using an by embedding the Markup inside of a script tag. The script tag's "type" attribute needs to be
changed to type="dojoe/xml" (Really anything the browser doesn't know about) and add the "dojoType"
attribute with a value of "dojoe.XmlScript"
<script type="dojoe/xml" dojoType="dojoe.XmlScript"> <ui> <dijit.TitlePane title="TitlePane" style="width:600px"> <dijit.form.Button onclick="alert('Event Works')" label="Just a Button"/> <div>This is just normal HTML</div> </dijit.TitlePane> </ui> </script>
Markup external to the file (Client-side Include)
The dojo.E UI below is created by including mark from an external file.
This provides a client-side Include feature, which can be used to build UI in a more modular way. Instead of embedding the markup
in the script tag use a "src" attribute to point to the markup file. The content of the markup file is
exactly the same as the content added to the script tag above.
<script type="dojoe/xml" dojoType="dojoe.XmlScript" src="js/dojoe/tests/_base/resources/ui.xml"></script> |