Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: alternative to LiveConnect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alternative to LiveConnect?



Do you know about any browser that support LiveConnect?

Netscape 4.5 in Classic mode.

Is there any alternative way for the communication between an applet and an HTML form?

Have you got any tip to access Java applets methods from a HTML page if the browser does not support LiveConnect?


You can do the HTML->Java part, but not the Java->HTML part. When the user clicks Submit, have Javascript write an APPLET tag with Param's containing the data from the form. For example, make a little floating DIV someplace on the page, and set document.getElementById("JavaCommDIV").innerHTML="<APPLET blah blah blah...

This applet can talk to any other applet in the VM. I've found the most robust, portable communication technique is to get the other applet using getAppletContext().getApplet(...), and then call its getParameter() method with a command string starting with a strange character, in order to recognize it as not a real getParameter call. You can override the getParameter() method in the target applet with logic to understand these command strings. The more obvious alternative would be to call your existing methods using reflection, however, I've run into bugs in the security manager on some platforms when I've tried that.

-Joshua Smith
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >alternative to LiveConnect? (From: Vertse Tamas <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.