Microsoft KB Archive/887741

= Internet Explorer does not execute code when an event handler is set to directly reference a DOM function after you install the MS04-038 security update =

Article ID: 887741

Article Last Modified on 11/12/2004

-

APPLIES TO


 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer (Programming) 6.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 = 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: Close this window Fixed code: Close this window   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: Close this window Fixed code: var my_funcptr = window.close;

function FunctionPointerInvoker {   my_funcptr; } Close this window </li></ul>

<div class="status_section">

STATUS
This behavior is by design.

<div class="references_section">