dojo: Connecting an Event to the Widget

 

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
    “http://www.w3.org/TR/html4/strict.dtd”>
<html>
    <head>
        <title>Dojo</title>   
    <!– load the dojo toolkit base –>
    <script type=”text/javascript” src= “dojo/dojo/dojo.js”
        djConfig=”parseOnLoad:true, isDebug:true”></script>
    <script type=”text/javascript”>
       // Load Dojo’s code relating to the Button widget
       dojo.require(“dijit.form.Button”);
    </script>

<button dojoType=”dijit.form.Button” id=”helloButton”>
        Hello World!
        <script type=”dojo/method” event=”onClick”>
           alert(‘You pressed the button’);
        </script>
    </button>
    <style type=”text/css”>
    /* CSS  */ 
    .testClass {
    background-color:red;
}
    </style>   
    </head>
    <body>
        <h1 id=”testHeading”>Dojo Click Button – Widgets</h1>       
        <div id=”contentNode”>
        <p></p>
    </div>
    </body>
</html>

Advertisements

One Response

  1. I’m not that much of a internet reader to be honest but your sites really nice, keep it
    up! I’ll go ahead and bookmark your website to come back later. Cheers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: