问题
I am stepping through code, and I realized I cannot close a window, because the DispHTMLWindow2 object close property is still to true.
if(winObject.closed != true)
winObject.close();
The problem is winObject.closed == true, and the window is clearly open.
Any ideas where I can look to figure this out?
Thanks, Grae
UPDATE: I realize this problem may have to do with an embedded PDF.
回答1:
It seems as though acrobat reader is keeping the pdf file open on you
http://acrobatusers.com/forum/javascript/closing-pdf-doc-javascript
I found a previous post that checks to see if the window is null rather then checking to see if it is closed (if the window isnt null then we know it is open) how to close a browser having pdf inside it not sure if that will help your problem
The other solution i found was to use an iframe like already stated.
http://bytes.com/topic/javascript/answers/148260-pdf-popup-close-button
来源:https://stackoverflow.com/questions/3728315/how-can-window-closed-true-when-the-window-is-open