Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I make a pop-up window close automatically ? 1

Status
Not open for further replies.

glab

Programmer
Jun 21, 2000
19
0
0
US
In my program I need to make a pop-up window close automatically after user is done printing the content of this window. Does anyone know how to do it without getting any intermediate messages from the browser?<br>And one more thing - is there any way to load a page, keeping it invisible?<br>Thank you in advance.<br>Glab
 
&gt;&gt; window close automatically after user is done printing the content of this window. <br><br>The browser controls printing and is not part of the DOM so, No.<br><br>&gt;&gt; is there any way to load a page, keeping it invisible?<br><br>Don't put any html or text inside the &lt;body&gt;&lt;/body&gt; tags, or... surround them with a comment block &lt;!-- &lt;body&gt;&lt;/body&gt; --&gt;<br><br>Good luck<br>-pete<br><br>
 
you want the page to be invisible, or the window to be invisble?<br><br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
 
How do you close a window, say, after a form submission is made?
 
if the window you want to close contains form just add this to your form tag
onsubmit=&quot;this.close()&quot;

else you need to reference the window like:
onsubmit=&quot;windowname.close()&quot;
 
i am also getting the same problem what glaba had,
if i use window.close() at end then IE close the popup window after printing is done , but in Netscape the popup
window is closed without invoking printer.
i am sending the Javascript please give me
the solution

function printit()
{
prevwnd=window.open(&quot;&quot;,&quot;print&quot;,&quot;width=400,height=480,
scrollbars=yes,resizeable=yes,status=0&quot;);
prevwnd.document.open();

prevwnd.document.writeln('<html><head><title></title>');
prevwnd.document.writeln('</head>');
prevwnd.document.writeln('<body onLoad=&quot;self.print()&quot; bgcolor=&quot;#ffffff&quot; ><form name=&quot;prntform&quot;>');

prevwnd.document.writeln(&quot;some message here&quot;);
prevwnd.document.writeln('</form></body></html>');
prevwnd.document.close();
prevwnd.close();
}

please help me how to close this window after printing in
Netscape




 
I am also facing similar problem - closing popup window
in netscape after form submission. Please help me if you
got solution for the same. IT works fine in IE.
 
I am also facing similar problem - closing popup window
in netscape after form submission. Please help me if you
got solution for the same. IT works fine in IE.


regards,
Prema S

prema.sundar@wipro.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top