• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

Need help with JavaScript onload print

I need help configuring a way to have an  body onLoad Yes/No message that will print the page.  If the user selects No, they view the page, if they select Yes, the page go to the printer.  I've seen and used parts of these scripts separately, but not together.  Any ideas?
0
gwr477
Asked:
gwr477
1 Solution
 
devicCommented:
like this?
========================================
<body onload="if(confirm('print the page?'))window.print();">
0
 
gwr477Author Commented:
Yes, that's it. Works great. Thanks Expert.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now