Internet Explorer 6 Doesn’t Focus on ActiveX Controls

Tuesday, May 5th, 2009 | Technology, Web Design

So I have a defect regarding an undesirable effect in IE6 where the initial focus on a webpage is not on our Flex/Flash application, but rather the parent HTML page.  Said differently, when you click on our “log in” link, it loads an HTML page with a layout that includes an HTML header, a Flash object and then a HTML footer, with the focus on the HTML header.  So when you type, or hit the tab key (to move from the username field to the password field) the browser scrolls south rather then changing focus.

In IE7 and FF3 this issue doesn’t exist, because they handle ActiveX objects differently.  Being an experienced IE user I instantly recalled experiencing this in older versions of IE.  I remembered traveling to certain pages and having to “click” or “activate” the Flash/WMP object before I could interact with it.  I surfed the internets for a while bouncing from forum to forum and found little covering this topic.  Then I searched Microsoft’s support site and came across this gem:

Internet Explorer 6 software update and its effect on ActiveX controls:

http://support.microsoft.com/kb/912945

This page explained exactly what was happening:

Microsoft has released a software update to Microsoft Internet Explorer 6 [...]. This update changes how Internet Explorer handles some Web pages that use ActiveX controls and Java add-ins. Examples of ActiveX controls include the following:

[...]
Macromedia Flash Player
[...]

After you install this update, you cannot interact with ActiveX controls from certain Web pages until these controls are enabled. To enable an ActiveX control, manually click the control.

GreatExplination! Gratification!

A little more digging and I came across a solid resolution to this problem.  Essentially the fix requires that you use JavaScript to activate the object upon the HTML rendering phase.  This page lists multiple different solutions.  Basically they all utilize JavaScript such as:

<!– HTML File –>
<html>
<body leftmargin=0 topmargin=0 scroll=no>
<script src=”docwrite.js”></script>
</body>
</html>

<!–  docwrite.js File –>
document.write(‘<object classid=”clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6″>’);
document.write(‘<param name=”URL” value=”example.wmv”>’);
document.write(‘<param name=”autoStart” value=”-1″></object>’);

This enables us to specify focus on our desired input field inside our Flex/Flash application.  Woohoo!

1 Comment to Internet Explorer 6 Doesn’t Focus on ActiveX Controls

Michael
June 25, 2009

I have been looking for a fix for this for quite a while, I was very excited to see this but I cannot seem to get it working.

Leave a comment

Categories