Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: Window Closes When a User Clicks Cancel to Cancel Closing a Window Created with the window.showModalDialog() Function


View products that this article applies to.

This article was previously published under Q259747

↑ Back to the top


Symptoms

When you set event.returnValue in the OnBeforeUnload event for a window, the user is prompted by Internet Explorer about whether they want to close the current window. If the user clicks Cancel in the modal dialog box to cancel closing the window, the window closes anyway.

This behavior affects windows that are created with the window.showModalDialog function and the window.showModelessDialog function. Note that the window.open function works correctly.

↑ Back to the top


Resolution

Internet Explorer 5.01

To resolve this problem, obtain the latest service pack for Internet Explorer 5.01. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
267954� How to Obtain the Latest Internet Explorer 5.01 Service Pack

Workaround

To work around this problem, use the window.open function to create the window.

↑ Back to the top


Status

Internet Explorer 5.01

Microsoft has confirmed that this is a problem in Internet Explorer 5.01. This problem was first corrected in Internet Explorer 5.01 Service Pack 1.

Internet Explorer 5.5

Microsoft has confirmed that this is a problem in Internet Explorer 5.5.

↑ Back to the top


References

For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

↑ Back to the top


Keywords: KB259747, kbprb, kbpending, kbdhtml, kbbug

↑ Back to the top

Article Info
Article ID : 259747
Revision : 3
Created on : 4/21/2006
Published on : 4/21/2006
Exists online : False
Views : 339