Accessibility
 
Home > Products > Flash > Support > Flash Player detection
Flash Icon Macromedia Flash Support Center - Flash Player detection
Sending users to one page if they have Shockwave and another if they don't

The script in this HTML page loads one page into the window if the user's browser has ActiveX, the Shockwave Flash 2.0, or Flash Player plug-in, and to another page if the user has any other Java-enabled browser.

<HTML>
<HEAD>
<TITLE>The Portal</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- use this comment tag to hide the enclosed code from old browsers.

//Look for a version of Internet Explorer that supports ActiveX (i.e., one that's
//running on a platform other than Mac or Windows 3.1) or a browser that supports
//the plugin property of the navigator object and that has Flash Player 2.0
//installed.

if ((navigator.appName == "Microsoft Internet Explorer" &&
    navigator.appVersion.indexOf("Mac") == -1 &&   navigator.appVersion.indexOf("3.1") == -1) ||

    (navigator.plugins && navigator.plugins["Shockwave Flash"])
                       || navigator.plugins["Shockwave Flash 2.0"]){

   //Load a pre-defined HTML page with Flash Player in it into the browser window.
    window.location='flashed.html';
}
else {
    //Load a pre-defined HTML page without Flash Player into the browser window.
    window.location='nonflashed.html';
}

// Close the comment tag. -->
</SCRIPT>
</HEAD>

<BODY>

<CENTER>

<H3><A HREF="flashed.html">See the Flashed Site</A><BR>
<FONT SIZE=3>requires <A HREF="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">Flash Player</A></FONT></H3>

<H3><A HREF="nonflashed.html">See the unFlashed Site</A></H3>
</CENTER>

</BODY>
</HTML>
To Table of Contents Back to Previous document