Note that there are some explanatory texts on larger screens.

plurals
  1. POEmbed YouTube video with jQuery in IE6 without SWFObject
    primarykey
    data
    text
    <p>Here's my code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; &lt;title&gt;&lt;/title&gt; &lt;script&gt; $(document).ready(function(){ $("#video").html('&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HPPj6viIBmU&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/HPPj6viIBmU&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;'); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="video"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>It works with Firefox and Chrome, but something's not quite right in IE6. Sadly, one of the project requirements is supporting this browser, so even if it workis in IE7, I need to work this out.</p> <p>I know there's SWFObject, but I'd rather not use it (we are loading already a bunch of JS files, we don't want more).</p> <p>Even this won't work: </p> <pre><code> &lt;script&gt; document.write('&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HPPj6viIBmU&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/HPPj6viIBmU&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;'); &lt;/script&gt; </code></pre> <p>It seems that IE6 ignores the <code>&lt;object&gt;</code> tag, here's the code it embeds.</p> <pre><code>&lt;EMBED src=http://www.youtube.com/v/HPPj6viIBmU&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp; width=480 height=385 type=application/x-shockwave-flash allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/EMBED&gt; </code></pre> <p>Is there a workaround?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload