Unsafe JavaScript attempt to access frame with URL from frame with URL youtube

best solution to use youtube API :

jQuery(document).ready(function() { var Vid = 'youtubeId'; var params = { allowScriptAccess: "always" }; var atts = { id: "myytplayer" }; swfobject.embedSWF("http://www.youtube.com/v/" + Vid + "?enablejsapi=1&playerapiid=ytplayer&version=3", "ytapiplayer", "320", "315", "8", null, null, params, atts); });
<div style="overflow-x: scroll;"> <div style="width: 1324px;"> jQuery(document).ready(function() { var Vid = 'youtubeId'; var params = { allowScriptAccess: "always" }; var atts = { id: "myytplayer" }; swfobject.embedSWF("http://www.youtube.com/v/" + Vid + "?enablejsapi=1&playerapiid=ytplayer&version=3", "ytapiplayer", "320", "315", "8", null, null, params, atts); }); </div> </div>
  1. <code>
  2. <div style="overflow-x: scroll;">
  3. <div style="width: 1324px;">
  4. jQuery(document).ready(function() {
  5. var Vid = 'youtubeId';
  6. var params = { allowScriptAccess: "always" };
  7. var atts = { id: "myytplayer" };
  8. swfobject.embedSWF("http://www.youtube.com/v/" + Vid + "?enablejsapi=1&playerapiid=ytplayer&version=3",
  9. "ytapiplayer", "320", "315", "8", null, null, params, atts);
  10. });
  11. </div>
  12. </div>
  13. </code>
<code>
<div style="overflow-x: scroll;">
<div style="width: 1324px;">
 jQuery(document).ready(function() {
            var Vid = 'youtubeId';
            var params = { allowScriptAccess: "always" };
            var atts = { id: "myytplayer" };
            swfobject.embedSWF("http://www.youtube.com/v/" + Vid + "?enablejsapi=1&playerapiid=ytplayer&version=3",
                "ytapiplayer", "320", "315", "8", null, null, params, atts);
        });

</div>
</div>
</code>
and add Div with ID "ytapiplayer"

Popular posts from this blog

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.

C# Crop white space from around the image

The specified version string contains wildcards, which are not compatible with determinism.