Replace object tag to embed tag, and ActiveX's method can't be called.

108 views
Skip to first unread message

goesmaster

unread,
Feb 12, 2012, 10:49:32 PM2/12/12
to ff-activex-host, ff-acti...@googlegroups.com
I use ff-activex-host to host our ActiveX, and I need to replace
object tag to embed tag, because when the user doesn't install the ff-
activex-host plugin, the embed tag has the property of pluginspage,
and the browser can know where to download it, but object tag doesn't.

I found that many people will use object and embed tag like below:

<html>
<head>
<script type="text/javascript">
function init()
{
alert(document.getElementById("Control"));
document.getElementById("Control").LoadMovie(0, "http://
192.168.1.8/3dtest/2.swf");
alert("bbb");
}
</script>
</head>
<body onload="init()">
<object id="Control" classid="clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000" >
<param name="src" value="http://192.168.1.8/3dtest/belowflash.swf">
<embed id="Control" TYPE="application/x-itst-activex"
clsid="{D27CDB6E-AE6D-11cf-96B8-444553540000}" param_src="http://
192.168.1.8/3dtest/belowflash.swf" pluginspage="my plugin download
page"/>
</object>
</body>
</html>

In object tag, there's a embed tag, because these codes doesn't need
to modify to any browser.
But the question is, when i test this page in IE, it works well,
flash's LoadMovie method was called and changes the flash movie in
function init. And i test it in chrome and firefox, function init just
alert the first alert, and it seems that LoadMovie doesn't be called.

So can anyone tell me why, and how i modify my code that i can use
embed tag will work.

Leeor Aharon

unread,
Feb 24, 2012, 4:32:02 AM2/24/12
to ff-acti...@googlegroups.com
I haven't tried using embed elements or the pluginspage attribute so I can't say what's going on here. A good start would be for you to enable logging and post the logs here, maybe we'll see something that'll point us in the right direction.

Personally, I try to steer clear of these "fringe" feature of HTML, mostly due to things like this -  http://code.google.com/p/chromium/issues/detail?id=15745. Note how it's marked Won'tFix.
I implement my own Javascript code that searches the navigator.plugins array to see whether the plugin I need is installed, otherwise prompting the user and directing them to the installation.

Leeor.


--
You received this message because you are subscribed to the Google Groups "ff-activex-host" group.
To post to this group, send email to ff-acti...@googlegroups.com.
To unsubscribe from this group, send email to ff-activex-ho...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ff-activex-host?hl=en.


Reply all
Reply to author
Forward
0 new messages