
January 15th, 2012, 01:51 PM
|
|
|
|
Using swfobject and getting "nested object" error
OK, I'm fairly new to ASP and I usually use PHP. I am using swf object to detect wether or not the client's browser has a flashplayer installed. If there is no flashplayer in the browser, alternate static content is presented.
I'm getting a "nested object" error in my ASP document. If I change the file extension from ".asp" to ".html" the flash detection works. It is clear that my code is buggy for ASP.
I'm not sure what to look for, but here is what the code looks like in my ASP page:
Code:
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
</script>
</head>
<div>
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="120">
<param name="movie" value="test.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="test.swf" width="300" height="120">
<!--<![endif]-->
<div>
<h1>Alternative content</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
Here's the actual url: click here
Here's the page in HTML: click here
You'll see in the HTML page, "Alternate Content" at the top of the page. This is where the flash logo, or the static logo will be.
Can anyone tell me how to fix the "nested object" error?
thanks
- 
|