#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    670
    Rep Power
    38

    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
    -
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    Your code appears to be 100% browser code not server asp code. I can move this to the javascript forum if you want.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    670
    Rep Power
    38

    Hey Doug G


    Actually I have resolved the problem, so, you can delete my post if you like.

    thanks
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    I'm happy to hear you got your problem solved.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo