On 11/16/06, Shane Hathaway <[EMAIL PROTECTED]> wrote:
Bryan Sant wrote:
> On 11/16/06, Shane Hathaway <[EMAIL PROTECTED]> 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

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to