Home arrow JavaScript arrow Page 3 - Rich Internet Applications with Dojo Toolkit 101
JAVASCRIPT

Rich Internet Applications with Dojo Toolkit 101


The need for RIA (Rich Internet Applications) is driven by the desire to take the user to the next level in user interaction. There are various technology options for creating rich Internet applications, such as Lazlo, XUL, XForms, Flex2, Java, Dojo, and so on. This tutorial looks at just one aspect of using the Dojo toolkit. Simply stated, dojo is a JavaScript toolkit which can be used for developing rich Internet applications.

Author Info:
By: Jayaram Krishnaswamy
Rating: 4 stars4 stars4 stars4 stars4 stars / 18
January 17, 2007
TABLE OF CONTENTS:
  1. · Rich Internet Applications with Dojo Toolkit 101
  2. · Displaying a simple button
  3. · Adding an event and styling
  4. · The DatePicker and Accordion widgets
  5. · How do the widgets look in various browsers?

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Rich Internet Applications with Dojo Toolkit 101 - Adding an event and styling
(Page 3 of 5 )

It is easy to add further functionality for both formatting and user interaction as shown in the following code. While the statement dojo.require("dojo.widget.Button") just provides reference to the Button object, the dojo.widget.* with the wild card provides reference to a wide set of widgets, but not all widgets.

<HTML> 
<HEAD> 
<TITLE> </TITLE>
<script type="text/javascript">
var djConfig = {isDebug: true};
</script>
<SCRIPT type="text/javascript" src="http://images.devshed.com/da/stories/
http://localhost/DoAjax/dojo.js"> </script> <script type="text/javascript"> dojo.require("dojo.widget.Button"); </script> <script type="text/javascript"> function test(){ alert ("Hello, Welcome to Dojo"); } </script> </HEAD> <body> <h2>Test</h2> <button dojoType="button" onClick="test"><span style="color: green; font-weight:bold">Hi Dojo!</span></button> </body> </HTML>

The click event runs the function test() which brings up the alert box with the welcome message. Notice the formatting of the text inside the button by the style applied to the <span/> tag. Also notice the differences between the dojo syntax and the regular JavaScript syntax.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials