Hi,
I need a bit of a help. I am trying to display a flash file ( or a gif if no flash ) and it seems to be working fine on IE6. yet it doesn't work on netscape6. Could any one help me out and point out what is wrong with my code?
Thanks a lot, much appreciated.
Code
----------------------------------------------------------
<table><tr><td>
<DIV id="bgimage" style="position:absolute; visibility: hidden; left:150; top:260; z-index:1;">
<script language="javascript">
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes\["application/x-shockwave-flash"\] ) {
// Check for Flash version 5 or greater in Netscape
var plugin = navigator.mimeTypes\["application/x-shockwave-flash"\].enabledPlugin;
if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf("."
-1))>=5)
UseFlash = 1;
} else if (navigator.appName && navigator.appName.indexOf("Microsoft"
!= -1 &&
navigator.userAgent.indexOf("Windows"
!= -1 && navigator.userAgent.indexOf("Windows 3.1"
== -1) {
// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
UseFlash = 1;
}
// Allow the cookie to override
if (document.cookie && (document.cookie.indexOf("FlashRenderOption=P"
>= 0)) {
UseFlash = 1;
} else if (document.cookie && (document.cookie.indexOf("FlashRenderOption=I"
>= 0)) {
UseFlash = 0;
}
if ( UseFlash ) {
document.write('<OBJECT classid="clsid
27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase=" document.write(' ID=VTS701_flash_336x280 WIDTH=336 HEIGHT=280>');
document.write('<PARAM NAME=movie VALUE="/flash_files/VTS701_flash_336x280.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#FFFFCC> ');
document.write('<EMBED src="/flash_files/VTS701_flash_336x280.swf" loop=false quality=best bgcolor=#FFFFCC ');
document.write(' swLiveConnect=FALSE WIDTH=336 HEIGHT=280');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE=" document.write('</EMBED>');
document.write('</OBJECT>');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape"
>=0 && navigator.appVersion.indexOf("2."
>=0)) {
document.write('<IMG SRC="/images/VTS-701_prevent_336x280.gif" WIDTH=336 HEIGHT=280 usemap="#cfo030802" BORDER=0>');
}
</script>
<NOSCRIPT><IMG SRC="/images/VTS-701_prevent_336x280.gif" WIDTH=336 HEIGHT=280 usemap="#cfo030802" BORDER=0></NOSCRIPT>
</DIV>
</td></tr></table>
I need a bit of a help. I am trying to display a flash file ( or a gif if no flash ) and it seems to be working fine on IE6. yet it doesn't work on netscape6. Could any one help me out and point out what is wrong with my code?
Thanks a lot, much appreciated.
Code
----------------------------------------------------------
<table><tr><td>
<DIV id="bgimage" style="position:absolute; visibility: hidden; left:150; top:260; z-index:1;">
<script language="javascript">
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes\["application/x-shockwave-flash"\] ) {
// Check for Flash version 5 or greater in Netscape
var plugin = navigator.mimeTypes\["application/x-shockwave-flash"\].enabledPlugin;
if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf("."
UseFlash = 1;
} else if (navigator.appName && navigator.appName.indexOf("Microsoft"
navigator.userAgent.indexOf("Windows"
// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
UseFlash = 1;
}
// Allow the cookie to override
if (document.cookie && (document.cookie.indexOf("FlashRenderOption=P"
UseFlash = 1;
} else if (document.cookie && (document.cookie.indexOf("FlashRenderOption=I"
UseFlash = 0;
}
if ( UseFlash ) {
document.write('<OBJECT classid="clsid
document.write(' codebase=" document.write(' ID=VTS701_flash_336x280 WIDTH=336 HEIGHT=280>');
document.write('<PARAM NAME=movie VALUE="/flash_files/VTS701_flash_336x280.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#FFFFCC> ');
document.write('<EMBED src="/flash_files/VTS701_flash_336x280.swf" loop=false quality=best bgcolor=#FFFFCC ');
document.write(' swLiveConnect=FALSE WIDTH=336 HEIGHT=280');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE=" document.write('</EMBED>');
document.write('</OBJECT>');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape"
document.write('<IMG SRC="/images/VTS-701_prevent_336x280.gif" WIDTH=336 HEIGHT=280 usemap="#cfo030802" BORDER=0>');
}
</script>
<NOSCRIPT><IMG SRC="/images/VTS-701_prevent_336x280.gif" WIDTH=336 HEIGHT=280 usemap="#cfo030802" BORDER=0></NOSCRIPT>
</DIV>
</td></tr></table>