IE 8 issue where window.close() is not occuring after winword.exe is fired to print a document
Posted
by Dave
on Stack Overflow
See other posts from Stack Overflow
or by Dave
Published on 2010-04-27T20:41:39Z
Indexed on
2010/04/27
20:43 UTC
Read the original article
Hit count: 304
In my web application, a popup page is called using window.open javascript. There is a Print button on the page that has an onclick event that calls a printchecks() function. The code in the printchecks() function is
function printchecks(){ window.print(); window.close(); }
Issue is that the window.print brings up the printer dialog fine and then you select a printer. The page is actually then printed and is a reference to an rtf document that opens in winword.exe behind the scenes. For some reason in IE 8, the window.close() does not occur. This worked in IE 7. In both cases, WINWORD.EXE process appears to run in the background after the page is printed but in the case of IE 8, control is not give back to that popup page until the WINWORD.EXE process dies which takes a minute or so. I am thinking that becasue control is not being sent back to the page in IE 8, the page is not closed automatically. You can close the page after control is given back after the minute or so. This does happen in IE on both Windows XP and Windows 7. Any ideas if there is a setting in IE 8 or some other reason this may be occuring?
© Stack Overflow or respective owner