Closed Bug 261290 Opened 20 years ago Closed 20 years ago

JavaScript doesn't see Java applet's functions: MacOS X only

Categories

(Core Graveyard :: Java: Live Connect, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 232652

People

(Reporter: mark, Assigned: yuanyi21)

References

()

Details

(Keywords: helpwanted)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv: 1.7.3) Gecko/20040910 A web page containing a Java applet and JavaScript code to call a method in that applet fails with: "TypeError: document.[insert applet name here].[insert method name here] is not a function." This fails only under Mozilla on Mac OS X. I have Mozilla 1.7.3 on Mac OS 10.3.5, Java 1.4.2_05. I downloaded this copy of Mozilla from mozilla.org only about 4 hours ago, so it's the latest. The same page works on many other platforms, including Firefox 1.0 Preview on both Windows and Linux. It even works on Safari 1.2.3 (Mac OS X). My applet element looks like: <applet code='LongRunningApplet2' width='100' height='30' name='LongRunningApplet' archive='LongRunningApplet2.jar'></applet> The JavaScript looks like: try { var bOK = document.LongRunningApplet.everythingIsOK(); document.getElementById("resultDiv").innerHTML = "Applet loaded OK"; } catch (e) { var msg="Call to applet failed: "+e; document.getElementById("resultDiv").innerHTML = msg; } (This also fails in a real application; the URL mentioned above is a stripped-down version for problem resolution.) Reproducible: Always Steps to Reproduce: 1. Go to http://people.stdnet.com/mark/mozilla-mac/StaticAppletElement.htm 2. Wait until the applet loads 3. Click Check Applet Actual Results: This test page (designed specifically for this bug report) will say: Call to applet failed: TypeError: document.LongRunningApplet.everythingIsOK is not a function. This is because an exception was thrown. Remember, this fails only under MacOS. Expected Results: Rather than throwing an exception, the call should have succeeded. This test page would then have read "Applet loaded OK". The applet does run; it's just that JavaScript can't talk to it.
Also tested OK on Mozilla 1.7.3 on Windows 2000. It really is MacOS-specific.
Summary: JavaScript doesn't see Java applet's functions: MacOS X only → JavaScript doesn't see Java applet's functions: MacOS X only
Java: LiveConnect bug, not JavaScript Engine -- reporter take note. /be
Assignee: general → kyle.yuan
Component: JavaScript Engine → Java: Live Connect
QA Contact: pschwartau → Xiaobin.Lu
Keywords: helpwanted
Whiteboard: DUPEME
*** This bug has been marked as a duplicate of 232652 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.