PDA

View Full Version : swf_id is undefined in IE


algorithm0
12-01-2006, 02:53 PM
for some reason my page is hanging for about 20 seconds in IE on load, and then i get ambiguous js error: swf_id is undefined. I can't figure out where the error msg is coming from. Has anyone observed this before?

in my js I am using the following:
// in the js script onload
document.getElementById('swf_id')

and in the body:

<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("spike.swf", "spike_swf", "570", "180", "8.0.22", "#ffffff");
so.addParam("allowScriptAccess", "always");
so.write("flashcontent");
</script>

algorithm0
12-01-2006, 04:01 PM
Oh yeah, so this really blows:

IE explodes when you put a flash movie w/ ExternalInterface inside a form tag. The problem: With ASP.NET 2-0, EVERYTHING resides inside a form tag. Dammit microsoft. Dammit!

algorithm0
12-01-2006, 08:49 PM
oh vomit.

I was able to just move the flash movie outsize of the form. Disaster avoided.