Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print then alert

Status
Not open for further replies.

Pattycake245

Programmer
Oct 31, 2003
497
CA
Since the search function is down I'll ask the question. I have a form which when submitted will automatically print the form. What I am wanting to do is have an alert come up after printing to say that the form was successfully submitted. However, this may pop up before the print prompt does. Is there any way to control this so that the alert does not come up until the print prompt has cleared? I'm thinking no, but I thougt I'd ask.

Tim
 
Don't think so...

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
While you cannot wait for printing to end, you can use setTimeout() to delay the message. Here is an example:

Code:
// print the window
window.print();

// display an alert in 5 seconds
setTimeout("alert('hello')", 5000);

*cLFlaVA
----------------------------
"Holy crip he's a crapple!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top