Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-15-2003, 05:42 PM   PM User | #1
nectar
New Coder

 
Join Date: May 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
nectar is an unknown quantity at this point
printing in mozilla

I'm having a problem printing in mozilla , it says that the page was replaced, please try again.
The script below opens a new window prints and closes. Works in ie but not in mozilla, I assume due to some error of mine in the script. Would appreciate any help
Thanks

<script language="JavaScript" type="text/javascript">
var printPage;
function printPage()
{
printPage = window.open('recipe_print.htm');
printPage.blur();
printPage.print();
setTimeout("printPage.close()",600);
}
</script>
nectar is offline   Reply With Quote
Old 07-15-2003, 05:56 PM   PM User | #2
Danne
Regular Coder

 
Join Date: Aug 2002
Location: São Paulo, Brazil
Posts: 367
Thanks: 0
Thanked 0 Times in 0 Posts
Danne is an unknown quantity at this point
Maybe you can try to put the print code in 'recipe_print.htm':

Code:
document.onload=function() {
    self.print();
    setTimeout('close();',600);
}
__________________
/Daniel
Danne is offline   Reply With Quote
Old 07-15-2003, 08:42 PM   PM User | #3
nectar
New Coder

 
Join Date: May 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
nectar is an unknown quantity at this point
Thanks for your reply. Had to adjust it a bit to work in explorer, but still doesnt work in mozilla, with slight adjustments the window of my printer comes up in mozilla, press ok, and...nothing.
Must be a simple error, because I'm sure I got it working once, but my javascript isnt good enough to see the error.
nectar is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:19 AM.


Advertisement
Log in to turn off these ads.