JavaScript
  Home arrow JavaScript arrow Page 3 - Rich Internet Applications with Dojo Toolk...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Rich Internet Applications with Dojo Toolkit 101
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2007-01-17

    Table of Contents:
  • Rich Internet Applications with Dojo Toolkit 101
  • Displaying a simple button
  • Adding an event and styling
  • The DatePicker and Accordion widgets
  • How do the widgets look in various browsers?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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.

    More JavaScript Articles
    More By Jayaram Krishnaswamy


       · This is my first article and many more will follow. Before I could post the initial...
     

    JAVASCRIPT ARTICLES

    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in
    - Active Client Pages at the Server
    - ACP Tab Web Page







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT