DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 887741 - Last Review: November 12, 2004 - Revision: 2.0

SUMMARY

Security Update 834707 includes a change to the way Internet Explorer handles function pointers. This change in functionality occurs when an event handler points directly to a Document Object Model (DOM) function. This article describes the issue and provides several workarounds.

SYMPTOMS

Microsoft Internet Explorer does not execute client-side code that is associated with an event handler that is directly set to a DOM function.

CAUSE

The MS04-038 security update includes a change to the way that Internet Explorer handles function pointers. This change in functionality occurs when an event handler points directly to a DOM function:
on<event> = DOM function pointer

WORKAROUND

To work around this change in Internet Explorer's functionality, use one of the following methods:
  • Directly invoke the function by using JavaScript:

    Original code:
    <A href=# onclick=window.close>Close this window</A>
    Fixed code:
    <A href=# onclick="window.close()">Close this window</A>
  • Store the function pointer in a variable and define another function to invoke the variable. The following examples use the onclick event to close a window:

    Original code:
    <A href=# onclick=window.close>Close this window</A>
    Fixed code:
    <script>
    var my_funcptr = window.close;
    
    function FunctionPointerInvoker()
    {
        my_funcptr();
    }
    </script>
    <A href=# onclick="FunctionPointerInvoker()">Close this window</A>
    
    

STATUS

This behavior is by design.

REFERENCES

For additional information about the MS04-038 security update, click the following article number to view the article in the Microsoft Knowledge Base:
834707  (http://support.microsoft.com/kb/834707/ ) MS04-038: Cumulative security update for Internet Explorer

APPLIES TO
  • Microsoft Internet Explorer 5.01
  • Microsoft Internet Explorer 5.5
  • Microsoft Internet Explorer (Programming) 6.0
Keywords: 
kbtshoot kbprb KB887741
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support