Google Answers Logo
View Question
 
Q: Javascript to detect flash isn't working ( No Answer,   0 Comments )
Question  
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>

Clarification of Question by severisth-ga on 04 Nov 2004 14:02 PST
Whoops, I meant "code posted on http://216.167.122.202/index_flash.asp".

I gave the link to the javascript file instead of the asp file.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

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 Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy