I use window object with close method to close a web page, this web page is designed by active server page and VBscript. the code is as follows: window.close() however, an alart messege comes from IE. It's details: The Web page you are viewing is trying to close the windows. Do you want to close this windows? I want to directly close the window without any alart messege. In VBA, we can add a declare Application.displayalart =false. How to do this in html or VBA? Thanks. -- Developer QA Dashboard Microsoft China Development Centre
"MicrolongR" wrote in message news:4035E949-9EC7-4FF2-BC4C-97A2C688269A@microsoft.com > I use window object with close method to close a web page, this web > page is designed by active server page and VBscript. the code is as > follows: window.close() > however, an alart messege comes from IE. Normally, only a window explicitly opened with window.open() can be closed with window.close() without a warning. Usually it is not a good idea for a page to close the browser that the user opened manually. If you insist on annoying your users, there is a workaround that appears to work on all IE versions: window.opener = window; window.close(); -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925