Forum Moderators: open

Message Too Old, No Replies

Code works perfectly in Mozilla FF but not IE

         

stidj

8:35 pm on Jun 29, 2006 (gmt 0)

10+ Year Member



If anyone can figure this out be my guest.
In Mozilla Firefox it works fine and as expected, you could click on either link and the expected .swf Flash file would be loaded.

However in IE there is no error message or anything but nothing actually loads at all. Can anyone explain why that would be and how I can make this code IE compatible?

Cheers & Thanks:

<SCRIPT Language="JavaScript">

function createCode(FileName)
{
/*
This function doesn't seem to work properly in IE (IE won't display a new Flash object) even though it doesn't have any errors.
*/
var arguments = createCode.arguments;
FileName = arguments[0];
var code = "<object width='700' height='600'>"+"<param name='movie' value='"+FileName+"'>"+"<embed src='"+FileName+"'"+"width='700'height='600'>"+"</embed>"+"</object>";

return code;
}

function showEngagement()
{
code = createCode('Engagement.swf');
document.getElementById("gallery").innerHTML = code;
}

function showBloopers()
{
code = createCode('bloopers.swf');
document.getElementById("gallery").innerHTML = code;
}

function showFamily()
{
code = createCode('family.swf');
document.getElementById("gallery").innerHTML = code;
}
</SCRIPT>
<body>
<h1>Pictures</h1>

<div width="700">
<a href="javascript:showEngagement()"><h3><u>Engagement</u></h3></a>
<a href="javascript:showFamily()"><h3><u>Family</u></h3></a>
<a href="javascript:showBloopers()"><h3><u>Bloopers</u></h3></a>
</div>

stidj

8:55 pm on Jun 29, 2006 (gmt 0)

10+ Year Member



sorry I missed the last part of the code:

<div id="gallery">
<object width="700" height="600">
<param name="movie" value="Engagement.swf">
<embed src="Engagement.swf" width="700" height="600">
</embed>
</object>
</div>

adni18

4:42 pm on Jun 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried testing createCode to make sure it actually works in IE?

daveVk

5:34 am on Jul 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



var arguments = createCode.arguments;
FileName = arguments[0];

This lines seem to achieve nothing?

src='"+FileName+"'"+"width='700'height='600'

Is white space required between attributes like?

src='"+FileName+"'"+" width='700' height='600'