开发者

IE gives "no such interface supported" message when inserting and <object> for a plugin

I'm trying to insert a video player plugin into the DOM using an object. This works fine with Firefox and Chrome, however I get a "no such interface supported" message from IE 8 and IE 7. The plugin works fine in all three if it's in the HTML file the server sends out.

Here is what I'm trying to create:

<object id="plugin" width="220" height="360" type="application/x-ourmediaplayer"  
  <param name='mode' value='LIVE' />  
  <param name="ip_address" value='10.220.196.150' />  
  <param name='port' value='80' />  
</object>

If I use the following code I get the error on IE:

var container = document.getElementById('pluginContainer');  
var plu开发者_如何转开发gin = document.createElement('object');  
plugin.id = 'plugin';  
plugin['width'] = '220';  
plugin['height'] = '360';  
plugin['type'] = 'application/x-ourmediaplayer'>

var param = document.createElement('param');  
param['name'] = 'mode'; param['value'] = 'LIVE'; plugin.appendChild(param);

param = document.createElement('param');  
param['name'] = 'ip_address'; param['value'] = '10.220.196.150';
plugin.appendChild(param);    `

param = document.createElement('param');  
param['name'] = 'port'; param['value'] = '80'; plugin.appendChild(param);

container.appendChild(plugin);

Does anyone have any ideas? Can I do this with IE, or is there some other way of appending an object of this type?


Might be too late, but I've seen this same error in a variety of cases. It is probably nothing wrong with your code. It is most likely a problem with the installation of IE, registration of some DLLs. In this thread somebody pointed to some scripts which fix IE, here.

Another site, specifies:

Register two DLL's using RegSvr32: actxprxy.dll and shdocvw.dll. After you register those two DLL's, reboot your computer and try it again. The message should disappear.

I hope that can help you.


I don't know for sure, but I'm guessing that it's a IE's mishandling of the object tag. Consider looking at the source for SWFObject for some ideas on how to fix it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜