Click to See Complete Forum and Search --> : HTML, Java and Flash


June 17th, 2000, 11:59 AM
Hi,
I wanted to create three opening pages for my web site. One using just pure HTML, one with java and one with flash. I know that I can get the browser to check if it has java and then forward the person to the appropriate page. Is there any way to see if the browser supports Macromedia Flash and to forward them to a Flash specific page? The other option is having a splash page as my home page and then let the user choose what they would rather see.

-Larry

Eugen SEER
June 18th, 2000, 10:02 AM
Try the following to find out the name of the Flash plugin:
<script language="JavaScript">
document.writeln("<table border>");
for(i=0; i<navigator.plugins.length; i++)
{
document.writeln("<tr>");
document.writeln("<td>" + navigator.plugins[i].name + "</td>");
document.writeln("<td>" + navigator.plugins[i].description + "</td>");
document.writeln("<td>" + navigator.plugins[i].filename + "</td>");
document.writeln("</tr>");
}
document.writeln("</table>");
</script>

And with the following code you can find out, if the browser supports Flash:
<script language="JavaScript">
if(navigator.plugins["Name you've found out before, e.g.: Flash Plugin or something like that"])
alert("Flash works!");
</script>