How do I Close print dialog opened by JScript by JScript itself?
-
My dot net application displays a Html page on a web control. The html page has a javascript embedded in it. The html page has button on it. When the html button is clicked, Java script lanches a print dialog using JScript's <code>Window.print().</code> There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded. Problem: The print dialog launched by the JScript <code>Window.print()</code> call still displayed. <big>How do I close the print dialog using the JScript?</big> Thanks in Advance :doh:
-
My dot net application displays a Html page on a web control. The html page has a javascript embedded in it. The html page has button on it. When the html button is clicked, Java script lanches a print dialog using JScript's <code>Window.print().</code> There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded. Problem: The print dialog launched by the JScript <code>Window.print()</code> call still displayed. <big>How do I close the print dialog using the JScript?</big> Thanks in Advance :doh:
I don't think you can close the print dialog from javascript. If that is possible, think of all the security issues that could arise.
Yusuf May I help you?
-
My dot net application displays a Html page on a web control. The html page has a javascript embedded in it. The html page has button on it. When the html button is clicked, Java script lanches a print dialog using JScript's <code>Window.print().</code> There is some other application (Kind of Monitor) which closes the Dot net Window. As the control in the Dot net window hosts the Html, the html also unloaded. Problem: The print dialog launched by the JScript <code>Window.print()</code> call still displayed. <big>How do I close the print dialog using the JScript?</big> Thanks in Advance :doh:
Check the following forum post. It is not a solution to your question, but may give you an idea. Can javascript control the Print dialog options?[External Link]
Tech Notes on Web Development and Software Development Technology