Applet to Javascript communication

P

Paul Richards

Hi,
I'm trying to figure out a way of getting my Java applet to update the
text in an html text box which is on the same html page as the applet. I
am following the instructions for accessing the DOM here:

http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html#common_dom

I'm having problems even getting the sample code to work correctly.
(Everything compiles, just crappy NullPointerExceptions from methods
which should be returning fine). This happens with Netscape 6/7 and
Mozilla 1.2. Netscape 4 falls over way before this and I do not have
access to IE.

Does anyone know how I can do this? Or perhaps there are some tutorials
somebody knows about..

My other option is to have some Javascript on the html page periodically
poll the Applet to check if it wants to update the text in the text box.
This solution is ofc a bit kak.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top