PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Flash header website on browsers with no flash

June4

Detect flash support on client browser to avoid the blank box on flash header websites.

Nowadays it is a common practice for web designers to have fancy flash headers and the rest plain text websites. In this way the visitor views a good looking site while the search engines are happy with the source of text.

But what if your visitor does not have flash support. The browser gives a thin bar at the top and in place of the fancy header, a blank box appears. I mean you can understand were I am going with this. Like no flash………. fancy looks ugly and the user might just closeeeeeee the window.

If you agree with me then lets move on….

To solve this issue I did the following:

  • Step 1: Use a JavaScript function to detect if flash is installed on the visitor’s browser
  • Step 2: If yes than normally play the flash header
  • Step 3: else show an image maybe a screenshot of the flash header

Copy the code below on a new file and save it “flash_detect.js”

Insert the code below in the <body> tag

Place the flash header and image in the same folder.

Flash header=header.swf
Image=header.jpg

Done there…………… believe me this is good advice use it!

posted under PHP
One Comment to

“Flash header website on browsers with no flash”

  1. On April 9th, 2011 at 4:42 pm Mario Says:

    hello,

    I am working on this project (see site) and I cannot get the code to work. I am using the Headway theme and put the .js file in the “custom” directory. I changed the src to the same directory and redirected the src to the location of the static and flash headers accordingly. I also tried putting the .js file in the main directory, but that did not work either.

    Any thoughts/suggestion?

    Thank you for any help that you can offer.—Mario

Email will not be published

Website example

Your Comment:

 

12,830 spam comments
blocked by
Akismet