cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Madu" <andrewm...@gmail.com>
Subject Dojo problems with cocoon 2.1.9
Date Tue, 11 Jul 2006 10:23:47 GMT
Hi,
just trying out dojo for the first time and am having problems with the
following script. Can anyone tell me why this doesn'r activate the alert
when clicking the button?:

dojo.js:

      dojo.require("dojo.event.*");
      dojo.require("dojo.widget.*");
      dojo.require("dojo.widget.Button");

      function helloPressed()
      {
        alert('You pressed the button');
      }

      function init()
      {
        var helloButton = dojo.widget.byId('helloButton');
        dojo.event.connect(helloButton, 'onClick', 'helloPressed')
      }

      dojo.addOnLoad(init);


<html>
  <head>
    <title>Dojo: Hello World!</title>

    <!-- SECTION 1 -->
    <script type="text/javascript" src="dojo.js"></script>
  </head>

  <body>
  </body>
</html>


regards

Andrew

Mime
View raw message