Trying to figure out why this swf which is loaded via javascript which is a requirement will load just fine in ie but not any other browser
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Host Log-in</title>
<!-- saved from url=(0014)about:internet -->
<style type="text/css">
body {
background-color: #FFFFFF;
}
</style>
</head>
<body style="margin: auto;" onLoad="javascript: sf.focus()">
<br />
<script type="text/javascript" language="javascript">
<!--
function doFSCommand(command, args) {
}
//-->
</script>
<script language="VBscript" type="text/javascript">
<!--
sub sf_FSCommand(ByVal command, ByVal args)
call doFSCommand(command, args)
end sub
//-->
</script>
<img src="/img/infinite-logo.png" width="248" height="85" alt="Infinite"><br>
<script language="javascript" src="swf.js" ></script>
<br>
</body>
</html>
js:
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1280" height="753" ID="sf" VIEWASTEXT>');
document.write(' <param name="movie" value="Host Log In.swf" />');
document.write(' <param name="menu" value="false" />');
document.write(' <param name="quality" value="high" />');
document.write(' <param name="wmode" value="window" />');
document.write(' <param name="allowScriptAccess" value="always" />');
document.write(' <param name="allowFullScreen" value="true" />');
document.write(' <embed src="Host Log In.swf" q开发者_如何学运维uality="high" name="sf" allowScriptAccess="always" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1280" height="753"></embed>');
document.write('</object>');
The <embed>
tag shouldn't be inside the <object>
. Try moving it outside the <object>
tag and see if that helps.
document.write('<object classid="... height="753" ID="sf" VIEWASTEXT>');
...
document.write('</object>');
It's a bad idea creating nodes that way. Use document.createDocumentFragment()
instead.
精彩评论