Navigation Menu
Alphabetical Listing
Site Contents

Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

General

A very simple script which activates objects in Explorer 7 so people don't have to click on Flash to activate.


Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: fixFlash.js


Head

Paste this code into the HEAD section of your HTML document.


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

11. From: Angell de Ville
11/09/2007 16:39:20

@Jeroen Haan

I used your new version and it did work. I added the code directly (not externally) in the head section of my page then added the onload event in the body tag along with the other onload functions I have in my page...

thanks... nice script.

9. From: Yulio
05/12/2007 18:56:17

very great script

8. From: Jeroen Haan
03/21/2007 11:44:52

Dear Luke and Nidhi,

Can you please supply us with code or life example?


7. From: Jeroen Haan
03/17/2007 11:23:35

New version can be found here:
http://www.haan.net/js/fixFlash.js

It handles the embed tag as well.

Be careful with it's function starter, the onload call...

Better is the start the script like this:
<body onload="fixFlash">

This way it won't mesh up with possible other onload calls.

PS
You can also exclude FireFox by using the window.attachEvent = function()
{
fixFlash();
}


6. From: paul d
03/06/2007 14:26:58

works...............but the flash jumps back to the startmaking the animation look faulty???

10. From: Jeroen Haan
flash problems
06/20/2007 20:48:06

Dear Paul,

Place the script starter at the bottom of the page just before </body> like this:

<script type="text/JavaScript">fixFlash();</script>

Even better to only target IE like this:

<!--[if IE 7]>
<script type="text/JavaScript">fixFlash();</script>
<![endif]-->

5. From: Nidhi
02/01/2007 04:14:56

Hi, I tried this script with IE7 but its not working on it.. Its still showing that you need to press space bar to activate flash control.

4. From: Jeroen Haan
01/31/2007 11:51:09

I have a new version available which also sets the embed tag.

Please see the example and source code here:
http://www.haan.net/test/flash_fix1.php

Note:
If you have other scripts running with this line
window.onload = function()
{
example_function_1();
}
Please ad the fixFlash function caller from within this block like this:
{
example_function_1();
fixFlash();
}


3. From: Marvin Jones
01/27/2007 18:13:42

Wonderful! This should end all those complaints I get from people who have only clicked a menu once and then written to me that my expensive Flash menus "don't work"!

2. From: Luke Harries
01/26/2007 02:03:50

This script disables the fscommand script on flash menus.

next comments...

Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.