Board index » jbuilder » Running applet interaction with Web page(s)

Running applet interaction with Web page(s)


2004-04-15 10:14:53 PM
jbuilder19
Hi,
I've been researching ways an applet can interact with its Web page.
This is for doing things like changing a field on the Web page when a
button in pressed in the applet, or (going the other direction)
changing a field in the applet when a button is pressed in the Web
page.
My conclusion is that although a variety of techniques tricks exist,
each one only works on certain OS/browser combinations and/or uses
undocumented (and therefore unreliable) behavior. Among other things,
I have to consider Mac users which appears to rule out a bunch of
stuff.
Am I correct, or am I missing something?
 
 

Re:Running applet interaction with Web page(s)

XXXX@XXXXX.COM (Bill D. Pirkle) writes:
Quote
Am I correct, or am I missing something?
The general rules are:
1) To give Javascript access to the applet's members, use the
MAYSCRIPT attribute in the APPLET tag.
2) Use the netscape.javascript.JSObject class to access the Javascript
DOM. Note that this doesn't appear to be available in VMs from
other vendors than Sun, Netscape and Microsoft, e.g. Oracle's is
missing the package.
 

Re:Running applet interaction with Web page(s)

On 16 Apr 2004 09:07:29 +0200, XXXX@XXXXX.COM (Tor Iver
Wilhelmsen (TeamB)) wrote:
Quote
The general rules are:

1) To give Javascript access to the applet's members, use the
MAYSCRIPT attribute in the APPLET tag.

2) Use the netscape.javascript.JSObject class to access the Javascript
DOM. Note that this doesn't appear to be available in VMs from
other vendors than Sun, Netscape and Microsoft, e.g. Oracle's is
missing the package.
Thank you for your reply!
I was under the impression that LiveConnect wasn't available on Macs,
but I did some more searches and found that with Safari 1.2, the Mac
apparently now supports it. Am I reading all this correctly - if I
require Mac users to use Safari 1.2 with Java 1.4.2, I could use the
technique you describe?
(Whether requiring that is a good idea is another question we'll have
to answer internally.)
References:
From www.apple.com/safari/
----------------------------------------
Java maximized
On Mac OS X, Java applets work best in Safari, which takes advantage
of the latest version of the standard Java Internet Plug-In. Applets
load much faster than previously and the plug-in supports new advanced
caching features for Java classes and JAR files. Certificates used in
signed applets are now stored directly into the Mac OS X Keychain,
providing centralized access. What’s more, with the Java 1.4.2
Plug-In, Safari supports websites that use LiveConnect for
communication between JavaScript and Java applets, letting you work
with more Java-based websites than ever before on the Mac.
From www.apple.com/safari/download/
----------------------------------------
Requirements for Safari 1.2:
?Mac OS X 10.3 or later
?Any Macintosh computer
----------------------------------------
From www.apple.com/macosx/features/java/
----------------------------------------
The Java 1.4.2 Update, now available from Software Update, improves
stability, memory usage, and correctness. Requires
Mac OS X v10.3.1 or later.
----------------------------------------
 

{smallsort}

Re:Running applet interaction with Web page(s)

XXXX@XXXXX.COM (Bill D. Pirkle) writes:
Quote
I was under the impression that LiveConnect wasn't available on
Macs, but I did some more searches and found that with Safari 1.2,
the Mac apparently now supports it. Am I reading all this correctly
- if I require Mac users to use Safari 1.2 with Java 1.4.2, I could
use the technique you describe?
In theory, yes. But note that the Apple VM might ship without the
netscape.javascript package - I cannot test that here. Based on your
quoted text, however, it seems it's directly based on Sun's 1.4.2
JRE/plugin, which has it.
 

Re:Running applet interaction with Web page(s)

On 19 Apr 2004 09:11:02 +0200, XXXX@XXXXX.COM (Tor Iver
Wilhelmsen (TeamB)) wrote:
Quote
In theory, yes. But note that the Apple VM might ship without the
netscape.javascript package - I cannot test that here. Based on your
quoted text, however, it seems it's directly based on Sun's 1.4.2
JRE/plugin, which has it.
Thanks Tor!