469,362 Members | 2,546 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

<OBJECT>, Javascript and IE

http://gallery.stevesobol.com/activex-plain.html works in Firefox 1.5 and
Opera 9 but not in IE 6, and I can't figure out why.

The IE developer toolbar's DOM inspector shows the OBJECT tag and the PARAM
tags inside it, and if I don't have the Javascript in an external file, I'll
get the "click here to activate" tooltip and the border around what is
supposed to be the Flash movie. If I right-click inside the border, I get the
Flash context menu. The movie just doesn't load.

Any help would be appreciated.

<html><head><title>foo</title>
<script>
function foo() {

AXObject = document.createElement("object");

AXObject.type="application/x-shockwave-flash";
AXObject.data="flashtest.swf";
AXObject.width="200";
AXObject.height="50";
AXObject.style.visibility="visible";

var p=document.createElement("param");
p.name="movie";
p.value="flashtest.swf";
AXObject.appendChild(p);
var p=document.createElement("param");
p.name="quality";
p.value="high";
AXObject.appendChild(p);

document.body.appendChild(AXObject);

}
</script>
</head>
<body id="foo" onload="foo()">
</body>
</html>

Help!

Thanks,
Steve
--
Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Apple Valley, California PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.
Aug 8 '06 #1
1 1883
Steve Sobol wrote:
http://gallery.stevesobol.com/activex-plain.html works in Firefox 1.5 and
Opera 9 but not in IE 6, and I can't figure out why.

The IE developer toolbar's DOM inspector shows the OBJECT tag and the PARAM
tags inside it, and if I don't have the Javascript in an external file, I'll
get the "click here to activate" tooltip and the border around what is
supposed to be the Flash movie. If I right-click inside the border, I get the
Flash context menu. The movie just doesn't load.

Any help would be appreciated.

<html><head><title>foo</title>
<script>
function foo() {

AXObject = document.createElement("object");
If found that dynamically creating OBJECT elements in IE, for Flash,
fails. For IE, I create and appendChild a DIV and then use innerHTML to
insert the Flash into the DIV:

str = "<object id=... ";
document.getElementById("oDiv").innerHTML = str;
Andrew Poulos
Aug 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by JayBrahms | last post: by
reply views Thread by Wolfgang Schwanke | last post: by
7 posts views Thread by Simon Strandgaard | last post: by
6 posts views Thread by Christopher Benson-Manica | last post: by
2 posts views Thread by Sam Samnah | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.