asp error with nested <object> tags

dpicco
dpicco used Ask the Experts™
on
Hi experts,

I need to use some code like this so my website will work in more than just IE.

                  
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="768" height="334">
											<param name="movie" value="flash\header_v8_11_5.swf" /> 
											<param name="quality" value="high" />
											<param name="menu" value="false" />
											<param name="wmode" value="transparent" />
											<!--[if !IE]> <-->
											<object data="header_v8_11_5.swf"
													width="768" height="334" type="application/x-shockwave-flash">
											 <param name="quality" value="high" />
											 <param name="menu" value="false" />
											 <param name="wmode" value="transparent" />
											 <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
											 FAIL (the browser should render some flash content, not this).
											</object><!--> <![endif]-->	

Open in new window


I can't get ASP to render the page. I'm getting HTTP 500 Internal Server Error. I think the problem is with the nested <object> tags. When I take out the second <object> tag and everything below it, it works fine (but only in IE)

How can I make this work with classic asp? I am using HTML 4.01 Transitional.

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
See if this from Adobe helps: http://kb2.adobe.com/cps/415/tn_4150.html

Author

Commented:
I'm still having the problem. This link explains the exact problem but the solution is not working. What am I doing wrong?
http://seanys.com/2007/09/10/asp-flash-nested-objects/

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Spirit Cup</title>
<link href="style.css" rel="stylesheet" type="text/css">

</head>
<body>

<table class="main_table" align="center">
	<tr>
		<td>
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="768" height="334">
											<param name="movie" value="flash\header_v8_11_5.swf" /> 
											<param name="quality" value="high" />
											<param name="menu" value="false" />
											<param name="wmode" value="transparent" />

<!--#include file="flash.txt"-->
			</object>

Open in new window


here's my flash.txt include file:
                                                      
		<!--[if !IE]> <-->
											<object data="flash\header_v8_11_5.swf"
													width="768" height="334" type="application/x-shockwave-flash">
											 <param name="quality" value="high" />
											 <param name="menu" value="false" />
											 <param name="wmode" value="transparent" />
											 <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
											 FAIL (the browser should render some flash content, not this).
											</object><!--> <![endif]-->	

Open in new window

Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
If you look at the link closer, you will see that they enclosed the inner 'object' tags in IE conditional statements.  You put conditional statements in your code but there's nothing but a space in between the tags and they are formatted wrong.  I don't think we care about a conditional space.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Author

Commented:
Hi DaveBaldwin,
Sorry, I'm not following you. I used the code from the Adobe link you provided. The problem is with the nested <object> tags and classic asp.


Fixer of Problems
Most Valuable Expert 2014
Commented:
This simple page works perfectly on IIS5.1 on Windows XP and on IIS7 on Godaddy.  Save this as "ASP-Flash.asp", replace 'test.swf' (twice) with the name of a real flash movie, and let me know what happens.  You might have to adjust some params also.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>ASP Flash</title>
</head>
<body>
<h1>ASP Flash</h1>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="244" height="183" align="middle"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="test.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff"><param name="allowFullScreen" value="true"><embed src="test.swf" quality="high" align="middle" bgcolor="#ffffff" width="244" height="183" allowFullScreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>

</body>
</html>

Open in new window

Author

Commented:
Hi DaveBaldwin,
It works perfectly in IE. Do you know if this should work on all browsers? sorry I don't have a way to verify this right now - I am fighting with IT to install other browsers on my laptop.
Thank you very much for your help.

Author

Commented:
It worked fine on Firefox on my laptop at home. Thank you.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
You're welcome, glad to help.  You should tell IT that us outside developers have IE, Firefox, Chrome, Safari, and Opera on our computers to check our web pages.  And if we have to deal with email, we have Hotmail, Yahoo, and Gmail accounts because they all display email differently.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial