Closed Bug 61284 Opened 26 years ago Closed 25 years ago

JavaScript event handlers do not fire when DOM elements created through Java/LiveConnect

Categories

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

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: gary.kind, Assigned: security-bugs)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) BuildID: Netscape release 6.0 Production I have an Applet that calls into JavaScript using liveconnect to add an INPUT button to a FORM element. It is done using a raw html string which includes the correct syntax for an onclick event handler. This event handler is present in the javascript code. The button is created successfully but clicking on the button does nothing! If I do the same thing using JavaScript only, it works fine. Reproducible: Always Steps to Reproduce: 1. Unzip the attached file eventhandler_test.zip 2. open the readme.txt file and follow the instructions. 3. Actual Results: When I run etest.html, which includes the applet, nothing happens. When I run etest2.html, which does everything in JavaScript, the event handler fires correctly. Expected Results: I would expect that the JavaScript event handler specified in the raw html text used to create the button would fire and an alert would appear to indicate that it had fired. This is another absolutely critical bug that is necessary for Oracle Applications products. We depend on JavaScript to catch events and then forward them on to Java. We depend on the ability to create elements dynamically by calling out to JavaScript from Java. This is a MUST fix for Oracle and it needs to be soon.
Priority: P3 → P1
This is not likely to be a JS engine bug. It seems more likely a DOM security or LiveConnect security bug. Mitch, can you debug a little and reassign or take it if appropriate? Thanks, /be
Assignee: rogerl → mstoltz
Status: UNCONFIRMED → NEW
Ever confirmed: true
Fixed. When calling into JS from Java, we weren't pushing the JS context onto the context stack. This was causing the security manager to reject the onClick event.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Mitchell. This is terrific! Great work. I have been using a Mozilla nightly build for a week now and it appears to fixed already in this version. Do you have any idea when the fix will come out in a Netscape release?
Sorry, I don't really know that.
Marking Verified -
Status: RESOLVED → VERIFIED
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: