Closed Bug 206529 Opened 21 years ago Closed 21 years ago

Javascript can't run Java instance method via LiveConnect during onLoad()

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 115998

People

(Reporter: mark, Assigned: joshua.xia)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 A java.awt.Applet with a single extra method -- void println(Object x) -- is called from Javascript during the onLoad event. The java object is visible and of the right type, but the method appears to be undefined. Running this same method from a later event, such as a button onclick(), works fine. Using Sun j2re-1_4_1_02-fcs-linux-i586. This problem occurs on Mozilla 1.3, but also in 1.4b and Netscape 7.0.2 I never experienced it under Windows, but can't test it, because my PC just died! Reproducibility: this happens *almost* every time, but with repeated hits of the "refresh" button on the browser, the method is *occasionally* found and run successfully during onLoad(). Smells like a race condition... Reproducible: Sometimes Steps to Reproduce: 1.Build the applet and stuff it into the jar file. 2.Ring up the HTML page. Check the javascript and java consoles for errors. 3.Push the "view" or "run" buttons to try the function outside the onLoad() event 4.Check the consoles again Actual Results: Javascript console shows '"document.embeds.theApplet.println is not a function' when the attempt is made during onLoad(); the println does not take place on the java console. When the view button is hit, a legal native function is shown in an alert. When the run button is hit, the java console shows that the println worked. Expected Results: The javascript error is bogus; the function is there, but for some reason, Mozilla can't find it during onLoad(). I'll attach the HTML and java files.
Reassigning to OJI component. This sounds to me like OJI bug 115998, "Java - JavaScript onLoad event should fire after applet's init method"
Assignee: rogerl → joshua.xia
Status: UNCONFIRMED → NEW
Component: Live Connect → OJI
Ever confirmed: true
QA Contact: pschwartau → dsirnapalli
Summary: Javascript can't run java instance method via liveconnect during onLoad() → Javascript can't run Java instance method via LiveConnect during onLoad()
*** This bug has been marked as a duplicate of 115998 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: