|
|
Subject:
Javascript to detect flash isn't working
Category: Computers > Programming Asked by: severisth-ga List Price: $13.20 |
Posted:
04 Nov 2004 14:01 PST
Expires: 05 Nov 2004 08:46 PST Question ID: 424545 |
I've got the following code posted on http://216.167.122.202/flash_detect.js. The purpose of it is to display a flash banner if the client has flash, and a randomized graphic if the client does not have flash. Why isn't it working? <script type="text/javascript" src="flash_detect.js"> function getFlashVersion() { return null; }; var requiredVersion = 5; var r = ((Math.ceil(Math.random() * 6))-1) var flashVersion = getFlashVersion(); if (flashVersion >= requiredVersion) { document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="235"><param name="movie" value="images/banner_home.swf"><param name="quality" value="high"><embed src="images/banner_home.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="235"></embed></object>') } else if (flashVersion == 0 || flashVersion == flashVersion_DONTKNOW || flashVersion == null) { document.write('<img src="images/bannerhome/' + r + '.jpg" height="235" width="750">') } </script> | |
|
|
There is no answer at this time. |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |