|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
window print & close dont work in netscape7.1
I have a requirement where i have to print the page contents in a printable format. For this i have to open the printable format in a new window and issue the print command.
i am using window.open for opening teh new window. In the body tag of the new window i have the following code.. <body onload="javascript:window.print()" onfocus="javascript:window.close()"> With this code i print the page and close the window. This works fine with IE. But with netscape 7.1 the print doesn't work. This is bcoz the window.close is being called even before the print spooling happens. COuld anyone help me with this where i can ensure that spooling of data is complete. |
|
#2
|
||||
|
||||
|
Why not just call the window.close() method after printing. That way, after the print dialog has been closed, the page will close.
E.g. <body onload="window.print();window.close();"> |
|
#3
|
|||
|
|||
|
I have tried the following code in netscape 7.1. But the printing still doesn't happen.
<body onload="window.print();window.close();"> The popup window closes before printing. |
|
#4
|
||||
|
||||
|
Hmm - interesting. What does happen using my suggestion?
Do some tests to see what's going on, and in what order by placing some debugging alert()'s in the onload... maybe the window.close method is being called incorrectly (before the print dialog is finished)? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > window print & close dont work in netscape7.1 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|