Accessibility

Active Content Update Article

 

Before and after examples of the JavaScript solution


Craig Goodman

Craig Goodman

Executive Editor,
Developer Center
Adobe

Created:
6 October 2003
User Level:
All

Before you update your website to work around the proposed changes to Internet Explorer, it is useful to take a look at what the effect of the changes will be on your users. For those of you who have not updated the browser, we are providing a demo of what users will see when viewing active content—before and after implementation of our recommended workaround.

Note: The update can be downloaded from Windows Update or from Microsoft Support.

For those of you who have the updated version of Microsoft Internet Explorer, these pages show the "before" and "after" examples of the JavaScript solution. The "before" example shows a page that will require users to activate the content before interacting with it in the future version of Internet Explorer. After the update, the page delivers the expected, seamless experience. The links below launch "before" and "after" examples of the same file.

Note: These examples show how the Flash content will behave only if you have the updated version of Internet Explorer. If you don't have this browser, you will not be able to tell the difference between the before and after examples.

How these examples work

The "before" example displays a Flash movie using traditional <object> and <embed> tag code. Using the new Internet Explorer you will see a tool tip prompting you to "Click to activate and use this control." If you do not have the browser yet, you can view the change in our demo or in illustration in the MSDN article Activating ActiveX Controls.

The "after" example displays a Flash movie using the recommended external JavaScript solution. See Preparing Your Website to Handle the Microsoft Changes to Internet Explorer for details on how to implement this fix. In this example, you should be able to interact with the content without having to click to activate it in any browser with JavaScript enabled.

Source code for the "before" and "after" examples

Here is the source code for both examples. Study the code to see how these pages display the example Flash files.

"Before" example source code

Run the "before" example ›

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
	<title>Before: Traditional Object/Embed Tag Combination</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 </head>
 <body>
   <!-- This object and embed tag combination is the most common way to embed Flash movies. -->
	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="369" height="113">
		<param name="movie" value="flash.swf">
		<param name="quality" value="high">
    	<embed src="flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="369" height="113"></embed>
  </object> 
 </body>
</html>

"After" example source code

Run the "after" example ›

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>After: Using the External Javascript Solution</title>
		<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
		<!-- These script tags reference the external JavaScript files (.js) which contain functions that dynamically write the object and embed tags.  These files are described and can be downloaded from the article "Preparing Websites With Active Content for Upcoming Browser Changes" at the Active Content Developer Center. -->
		<script type="text/javascript" src="after/AC_RunActiveContent.js"></script>
		<meta content="MSHTML 6.00.2800.1226" name=GENERATOR>
	</head>
    <body>
	<!-- This script tag calls the functions defined in the external JavaScript file to dynamically generate the tags that embed the Flash movie in the page. -->> 
	<script type="text/javascript">AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','369','height','113','src','flash','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash' ); 
</script>

<!-- Content inside a noscript tag will be displayed if the user does not have Javascript enabled or is using a browser that does not support JavaScript -->
<noscript>
	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="369" height="113">
      		<param name="movie" value="flash.swf">
      		<param name="quality" value="high">
		<embed src="flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="369" height="113"></embed>
	</object> 
<p><em>Note: You do not have JavaScript enabled.<em></p>
</noscript>
</body>
</html>

About the author

Craig Goodman is the Executive Editor of the Developer Center. He and his team work with developers to publish the Developer Center tutorials and articles. Craig joined Macromedia in 1995. Before the creation of the Developer Center, he had various roles, including managing web support and supervising product technical support for Flash and Dreamweaver.