# Javascript error in IE when Flash Player is not installed

**URL:** <https://forum.kirupa.com/t/javascript-error-in-ie-when-flash-player-is-not-installed/259238>\
**Category:** web dev\
**Created:** [May 2, 2008, 11:59am UTC](https://forum.kirupa.com/t/javascript-error-in-ie-when-flash-player-is-not-installed/259238 "2008-05-02T11:59:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![web\_traveller](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@web\_traveller](https://forum.kirupa.com/u/web_traveller)\
**Post date:** [May 2, 2008, 11:59am UTC](https://forum.kirupa.com/t/javascript-error-in-ie-when-flash-player-is-not-installed/259238/1 "2008-05-02T11:59:42Z")

</div>

Hi!

I am trying to implement SWFObject 2.0 to detect Flash for two YouTube videos embedded on two of my web sites. I followed the documentation here [http://code.google.com/p/swfobject/](http://code.google.com/p/swfobject/) (I used static publishing) and it works perfectly in Firefox.

However, I get a Javascript error with IE 6 and 7, which is triggered only when the Flash Player is not installed. When the player is on my machine, I see the movie and there is no error on the page.

This is the Javascript error I get with IE 6 and 7 when no Flash Player is installed:  
line: 6  
char: 6987  
error: object required  
code: 0  
URL: [http://www.ecounesco.ie/detectflash.aspx](http://www.ecounesco.ie/detectflash.aspx)

I get the same exact error for both of my sites:  
[http://www.ecounesco.ie/detectflash.aspx](http://www.ecounesco.ie/detectflash.aspx)  
and:  
[http://www.natc.ie/youth/dvd08\_fldetect.php](http://www.natc.ie/youth/dvd08_fldetect.php)

My code on this site [http://www.natc.ie/youth/dvd08\_fldetect.php](http://www.natc.ie/youth/dvd08_fldetect.php) is:  
\<head\> section:

```auto
<script type="text/javascript" src="/scripts/swfobject.js"></script>
    <script type="text/javascript">
    swfobject.registerObject("youthdvd", "9.0.0", "/scripts/expressInstall.swf");
</script>

```

 section:

```auto
<div align="center">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="263" id="youthdvd" align="middle">
    <param name="movie" value="http://www.youtube.com/v/sKfG_TLDxL4&amp;hl=en&amp;rel=0&amp;color1=336699&amp;color2=6699cc&amp;border=1" />
    <param name="wmode" value="opaque" />
    <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="http://www.youtube.com/v/sKfG_TLDxL4&amp;hl=en&amp;rel=0&amp;color1=336699&amp;color2=6699cc&amp;border=1" width="300" height="263" align="middle">
        <param name="wmode" value="opaque" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflashplayer">
          <img src="../images/Youth_DVD_Get_Flash_Player.jpg" alt="Get Adobe Flash player" width="300" height="263" border="0" />
    </a>
    <!--[if !IE]>-->
        </object>
    <!--<![endif]-->
    </object>
</div>

```

My other site has the exact similar code.

I have tested and tested and tested and cannot find why this is happening. Thanks for your help!

* * *

Web Traveller
