Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: how to open a modal window in Netscape 6 @#^%#^$


Message #1 by Rajeev_Venkatraman <Rajeev_Venkatraman@s...> on Wed, 19 Jun 2002 13:31:58 +0530
I am able to open a modal window in IE using <body onblur="self.focus()"> .
The same does not seem to work in any account on Netscape 6. Can any one
help please........

Regards,
Rajeev

-----Original Message-----
From: Premjit Mazumdar [mailto:premjit@p...]
Sent: Wednesday, June 19, 2002 2:01 PM
To: javascript
Subject: [javascript] Re: Printing works sometimes and sometimes not!


Apologies: I left of the declaration of the printWindow variable of course!
Maz


> Hi, I have a problem with the following cut-down version of a function. 
If 
I>  leave in the printWindow.close() line at the bottom, I find that the 
f> irst time a user calls this function, even if the window contains more 
t> han one page of text, only one page is printed. On subsequent calls, it 
m> ay well be that all the pages are printed. I can't understand this 
b> ehaviour - cannot see anything wrong with the code or any logical 
s> equence to these events.

> Can anyone help please!

> Thanks,

> Maz

> 
	> function printBulletin()
	> {
	> 	var sText="";
	> 	var printWindow;
	> 	var bprintingConfirmed = confirmPrint("bulletin");

> 		if (bprintingConfirmed == "true")
	> 	{

> 			// ..collect text code here and assign to sText...
	> 		printWindow = window.open
(> '', 'PrintBulletin', 'height=400,width=700,scrollbars=yes,status=yes,too
lb
a> r=no,menubar=yes,location=no,left=50,top=50');
	> 		printWindow.document.open();
	> 		printWindow.focus();
	> 		printWindow.document.write(sText);
	> 		printWindow.document.write('</DIV></BODY></HTML>');
	> 		printWindow.document.close();
	> 		printWindow.window.print();

> 			//printWindow.close(); omitted as sometimes only 
o> ne page is printed; subsequent prints work though!
	> 		printWindow.alert("You may now close this window 
i> f you wish.");
	> 			

> 
	> 	}
	> }

> 

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

  Return to Index