2011-01-19 8 views
0

IE7とIE8でオブジェクトをロードしません:swfobject.embedSWF私はFF、オペラ、クロームで素晴らしい実行されているこのコードを持って

<script type="text/javascript"> 
        $(document).ready(function(){ 
         var swfUrl = "http://www.youtube.com/apiplayer?video_id=<?php echo bg_get_video_id($post->post_content)?>&enablejsapi=1&version=3&playerapiid=ytplayer_<?php echo $i?>"; 


         // allowScriptAccess must be set to allow the Javascript from one 
         // domain to access the swf on the youtube domain 
         var params = { allowScriptAccess: "always", wmode: "opaque" }; 

         // This sets the ID of the DOM object or embed tag to 'myytplayer'. 
         // You can use this ID to access the swf and call the player's API 
         var atts = { id: "ytplayer_<?php echo $i?>", class: "ytplayer"}; 
         var flashvars = {}; 
         swfobject.embedSWF(swfUrl, "ytdiv_<?php echo $i?>", "300", "120", "9", null, flashvars, params, atts); 
        }); 
       </script> 

しかし、Internet Explorerバージョン7および8にそれはPHPの一部だありませんWordpressのファイルですが、重要ではありません - video_idとytdiv_はすべてOKです。他のブラウザでも動作します。

IEで動作させるためにできることはありますか?私はそれが原因で何が起こったのか考えていません。私のためにそれを解決し

乾杯、 Nebril

答えて

2


var atts = { id: "ytplayer_", "class": "ytplayer"};

"クラス" 引用符を入力し、あなたが行われています。それは少なくとも私を助けた。

+0

それも私のために働いた。ありがとう:) – Mike

1

私はそれが私が持っていた同じ問題だかどうかわからないが、私は、私はそれが今だと思う、swfobjectの最新バージョン2.2にアップグレードする必要がありました、。ここで

関連する問題