google-code-export / swfobject

Automatically exported from code.google.com/p/swfobject
1 stars 1 forks source link

Replacing <object id="some_id"> failed... #419

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use <object id="some_id"><params ...> <embed> ... </embed></object>
2. use swfobject to replace the "some_id" by indicating the HTML element
named "some_id"
3. run it.

What is the expected output? What do you see instead?
It should be swfobject rather the original object.

What version of the product are you using? On what operating system?
I.E. 6 , did not test I.E.7 or I.E. 8. On Window XP

Please provide any additional information below.

Original issue reported on code.google.com by gitt...@gmail.com on 29 Dec 2009 at 9:45

Attachments:

GoogleCodeExporter commented 9 years ago
IE6 doesn't appear to respect the relationship between <object> and the nested 
<embed>. If you modify your test file to use the following code, you'll see 
that the <embed> still appears. Thus this is not a SWFObject bug, but an IE bug.

//comment out the embedSWF() so it doesn't fire
//swfobject.embedSWF( ... );

//Replace the contents of "video_object" with nothing (which should erase the 
neted <embed> element).
document.getElementById("video_object").innerHTML = "";

Result: the <embed> element still appears, even when SWFObject is taken out of 
the picture.

If you're intent on using SWFObject to replace an existing <object><embed> 
combo, it's probably best to target the parent DIV instead of the object.

Original comment by platelu...@gmail.com on 7 Nov 2010 at 7:55