Last Comment Bug 210863 - document.write doesn't work for ActiveX object element usage
: document.write doesn't work for ActiveX object element usage
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: x86 Windows XP
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2003-06-26 23:14 PDT by Arun Ranganathan
Modified: 2011-07-09 07:52 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

HTML test case showing the problem (475 bytes, text/html)
2003-06-26 23:16 PDT, Arun Ranganathan
no flags Details
Using DOM techniques to create OBJECT element for WMP9 (1.20 KB, text/html)
2003-06-26 23:22 PDT, Arun Ranganathan
no flags Details
This is the fix. (506 bytes, text/html)
2004-06-25 08:39 PDT, Bob Jones
no flags Details

Description Arun Ranganathan 2003-06-26 23:14:02 PDT
In browsers with ActiveX support built in via adamlock's plugin, you cannot
dynamically write out an object element with document.write since the control
won't render.

Expected Behavior: using document.write to write out an OBJECT element with the
classid of an ActiveX control (say WMP 9) should get it to draw the control.  

Actual Behavior: Nothing happens -- the control is not rendered.

The attached testcase is illustrative of this.
Comment 1 Arun Ranganathan 2003-06-26 23:16:30 PDT
Created attachment 126606 [details]
HTML test case showing the problem
Comment 2 Arun Ranganathan 2003-06-26 23:20:59 PDT
The first attachment illustrates the problem; it also won't do any good to use
DOM techniques to create the control.  While the DOM techniques *do work* to
draw the control, you cannot playback content (using WMP 9) and the control's ID
doesn't seem to be recognized; the second attachment illustrates this.
Needless to say, this makes it difficult to dynamically create content.
Comment 3 Arun Ranganathan 2003-06-26 23:22:21 PDT
Created attachment 126607 [details]
Using DOM techniques to create OBJECT element for WMP9
Comment 4 David Bradley 2003-06-27 07:39:40 PDT
I ran the first test case. It's not getting to any of the IDispatch code, so it
must be higher up at the object tag or plugin implementation
Comment 5 Bob Jones 2004-06-25 08:39:48 PDT
Created attachment 151693 [details]
This is the fix.

This bug is not a rendering issue at all.  The problem has to do with the
document object.  When you call a method from document.onLoad or in the head
(or from anywhere else for that matter) in netscape 7, the document object is a
little screwey.  The fix is to call the methods from a script tag between the
body tags and pass in the document object.  Then use the document object passed
in to do the writing.
Comment 6 Ed Morley [:emorley] 2011-07-09 07:52:19 PDT
The ActiveX embedding API was removed in bug 662023 and friends.


[Filter bugspam on activexinvalid]

Note You need to log in before you can comment on or make changes to this bug.