cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <j.re...@hippo.nl>
Subject Re: Dojo problems with cocoon 2.1.9
Date Tue, 11 Jul 2006 10:34:26 GMT
Hi Andrew,

I'm not really into dojo yet and I do not really know if this is the right list to ask your
questions,
but from a logical point of view.

I guess you will need a button within your page with the id of 'helloButton'?
Like:

<body>
   <input type="button" id="helloButton"/>
</body>

Regards,

Reijn


Andrew Madu wrote:
> 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

-- 
Met vriendelijke groet,
Kind regards,

Jeroen Reijn

Hippo

Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message