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 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy If finished loading {print page}?

    Does anyone know how to get the site to print the page (or show print dialog) once the page has finished loading?

    Thanks!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,159
    Thanks
    203
    Thanked 2,549 Times in 2,527 Posts
    Quote Originally Posted by john6 View Post
    Does anyone know how to get the site to print the page (or show print dialog) once the page has finished loading?

    Thanks!
    <body onload = "window.print()">

    That will not actually print the page but bring up the print dialog so that the user has an opporunity to cancel the print.



    "It's hard to put my thoughts in their shoes". - Sports commentator.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


  •  

    Posting Permissions

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