Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to redirect if flash is installed

Posted on 2009-12-16
5
Medium Priority
?
432 Views
Last Modified: 2012-06-21
I know there are ways to redirect a page containing flash if flash player is not installed. I want to set up an html page to do the reverse: display the html if flash is NOT installed, and redirect if flash IS installed.

How can I cause an html page to redirect if flash is detected?
0
Comment
Question by:Jonathan Greenberg
  • 2
  • 2
5 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 26069756
0
 
LVL 12

Accepted Solution

by:
Barry Jones earned 2000 total points
ID: 26070988
Hi macrolific

The attached html file demonstrates the use of adobe's flash detection script (8kb) - this is attached also (remove .txt extension).

It will redirect to a non-html page is flash is detected.

Hope this helps,

TheFoot
<!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">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>   
	<script type="text/javascript" src="adobe-flash-detect.js"></script>   
	<script type="text/javascript">

		// Return true/false is adobe flash player is installed
		var isFlashInstalled = function(){return (parseInt(GetSwfVer()) > 0);}
	
		// Detect flash - redirect if found
		if (isFlashInstalled()){window.location.href = "flash-content.html";}
	 
	</script>  
	<style type="text/css">	
	</style>
</head> 
<body>
	<div style="width: 200px; margin: auto; border: 1px solid #066633; color: #066633; padding: 6px;">
		This HTML content is displayed if either; javascript is not enabled, or flash is not present.
	</div>
</body>
</html>

Open in new window

adobe-flash-detect.js.txt
0
 

Author Comment

by:Jonathan Greenberg
ID: 26075151
TheFoot, yours is a simple yet comprehensive solution that works perfectly. Thanks! logudotcom, thanks for your help, too.
0
 
LVL 12

Expert Comment

by:Barry Jones
ID: 26078872
Glad to help thanks for the points..
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 26078995
@ macrolific

thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question