PRB: Setting JScript Event Handler Invokes the Handler Function (183509)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
This article was previously published under Q183509 SYMPTOMS
Setting an event handler function with the following syntax causes the
event handler function to be invoked.
div1.onclick = OnClickHandler(str);
RESOLUTION
Create a function object that calls your event handler like this:
div1.onclick = new Function("return OnClickHandler(str)");
STATUS
This behavior is by design.
REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
Modification Type: | Major | Last Reviewed: | 5/11/2006 |
---|
Keywords: | kbcode kbprb KB183509 |
---|
|