Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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>

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    São Paulo, Brazil
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe you can try to put the print code in 'recipe_print.htm':

    Code:
    document.onload=function() {
        self.print();
        setTimeout('close();',600);
    }
    /Daniel

  • #3
    New Coder
    Join Date
    May 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •