Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

setInterval - Print after a delay

Posted on 2012-08-18
2
Medium Priority
?
344 Views
Last Modified: 2012-08-18
My code is below.  How do i get the print to happen after a few seconds.  Right now it just pops up immediately.

          <script type="text/javascript" language="Javascript1.2">
            function printpage() {
                window.print();
            }
         setTimeout(printpage(), 6000);
        </script>
0
Comment
Question by:EricLynnWright
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 38307915
Into a function

setTimeout(function() {printpage();},6000);
0
 
LVL 3

Author Closing Comment

by:EricLynnWright
ID: 38307918
Thanks, Gary!  Appreciate your assistance on a Saturday.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question