How can I dynamically add an <object> tag with JavaScript in IE?

Posted by Detlef D. Doerscheln on Stack Overflow See other posts from Stack Overflow or by Detlef D. Doerscheln
Published on 2008-11-11T15:39:48Z Indexed on 2010/04/23 10:33 UTC
Read the original article Hit count: 317

I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. The plugin could be missing and needs to get downloaded in this case. The dynamically added embed tag for Firefox works as expected. The dynamically added object tag for Internet Explorer seems to do nothing at all. The object tag needs the following attributes to function properly.

id ="SomeId" classid = "CLSID:{GUID}" codebase = "http://www.MyActicexSource.com/MyCuteActivex.CAB#Version=2,0,0,1"

Even a general working idea or method would be nice.

Thanks!

© Stack Overflow or respective owner

Related posts about internet-explorer

Related posts about JavaScript