Flash -vs- Applets

Bryan Sant bryan.sant at gmail.com
Thu Nov 16 15:23:24 MST 2006


On 11/16/06, Shane Hathaway <shane at hathawaymix.org> wrote:
> Bryan Sant wrote:
> > On 11/16/06, Shane Hathaway <shane at hathawaymix.org> wrote:
> >> * allow applets to manipulate the DOM just like Javascript can; and
> >
> > They can.  Applets can also talk directly with javascript and vice-versa.
>
> Can you point me to a reference of some kind?  What I have in mind is
> something along these lines:
>
> class XYZ (Applet) {
>    void show(String elem_id) {
>      Element e = getElementById(elem_id);
>      e.style.display = "block";
>    }
>
>    void addMenuHandler(String elem_id) {
>      Element e = getElementById(elem_id);
>      e.addListener(new MouseListener() {
>        public void mouseClicked(MouseEvent e) {
>          show("menu");
>        }
>      });
>    }
> }
>
> That would be great.  I would combine it with Jython so I can finally
> mess with the browser in Python. ;-)

Ok, I'm a big liar.  The DOM manipulation stuff is only possible by
having your applet execute javascript code.  So the javascript is
doing the DOM manipulation, not Java.  Your original complaint is
valid.  It would be nice if your applet could directly manipulate the
page.

-Bryan



More information about the PLUG mailing list