[Dojo-interest] Re: Dojo-interest Digest, Vol 16, Issue 104

Justin Spears speajus at gmail.com
Wed Apr 19 13:32:46 MDT 2006


replace this with
       dojo.event.connect(helloButton, 'onClick', 'helloPressed')

this
       dojo.event.connect(helloButton, 'onClick', window, 'helloPressed')
or
       dojo.event.connect(helloButton, 'onClick', helloPressed)

-js
On 4/19/06, Bill Keese <bill at dojotoolkit.org> wrote:
>
> I think the idea was to use the button widget, rather than a plain button.
>
> James Burke wrote:
> > In the bottom example (the one with the input type button), make the
> > following changes:
> >
> > - Put a semicolon after alert(dojo). So it would look like this:
> > alert(dojo);
> >
> > - Inside the init function, the first line should look like this:
> > var helloButton = dojo.byId('helloButton');
> >
> > - The button tag is malformed. It should look like this:
> > <button id="helloButton">Hello World!</button>
> >
> > James
> >
> > On 4/18/06, jagadeesh kella <jagadeeshkel at yahoo.com> wrote:
> >> hello...
> >>
> >> i checked this code..
> >>
> >>  <script type="text/javascript">
> >>       alert(dojo)
> >>       dojo.require("dojo.event.*");
> >>       dojo.require("dojo.widget.*");
> >>       dojo.require("dojo.widget.Button2");
> >>
> >>       function helloPressed()
> >>       {
> >>         alert('You pressed the button');
> >>       }
> >>
> >>       function init()
> >>       {
> >>         var helloButton = dojo.widget.byId('helloButton');
> >>         dojo.event.connect(helloButton, 'onClick', 'helloPressed')
> >>       }
> >>       dojo.addOnLoad(init);
> >>     </script>
> >>
> >> </head>
> >> <body>
> >> <button dojoType="Button2" id="helloButton">Hello World!</button>
> >> </body>
> >> </html>
> >>
> >>
> >> i want to chnage code like this
> >>
> >>
> >>
> >>  <script type="text/javascript">
> >>       alert(dojo)
> >>       dojo.require("dojo.event.*");
> >>       dojo.require("dojo.widget.*");
> >>       dojo.require("dojo.widget.Button2");
> >>
> >>       function helloPressed()
> >>       {
> >>         alert('You pressed the button');
> >>       }
> >>
> >>       function init()
> >>       {
> >>         var helloButton = dojo.widget.byId('helloButton');
> >>         dojo.event.connect(helloButton, 'onClick', 'helloPressed')
> >>       }
> >>       dojo.addOnLoad(init);
> >>     </script>
> >>
> >> </head>
> >> <body>
> >> <input type="button" id="helloButton">Hello World!</button>
> >> </body>
> >> </html>
> >>
> >> can i access this button id same as above ...?
> >>
> >>
> >> regards
> >>
> >> jag
> >>
> >>
> >>
> >>  ________________________________
> >> New Yahoo! Messenger with Voice. Call regular phones from your PC and
> save
> >> big.
> >>
> >>
> >> _______________________________________________
> >> Dojo FAQ: http://dojo.jot.com/FAQ
> >> Dojo-interest at dojotoolkit.org
> >> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >>
> >>
> >>
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo-interest at dojotoolkit.org
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20060419/5d894e80/attachment-0001.html


More information about the Dojo-interest mailing list