Jump to content

[SOLVED] redirecting after window.print()


r-it

Recommended Posts

hey, can anyone help me with this, i have a page that works like this: it gets a saleid from the url and echos the sale items according to the sale id, the thing is i set the the body onload to window.print(). and the page cannot redirect after the print dialog box appears as output is sent before redirecting. If i were to put a link on the page, then it would show on the printed page, so i want it to redirect after the dialogbox.

 

plz help

Link to comment
https://forums.phpfreaks.com/topic/41235-solved-redirecting-after-windowprint/
Share on other sites

you should never need to echo something before redirect. It's pointless. But if you want a time delay use a meta refresh.

 

PLACE THIS IN HEADER:

 

<meta http-equiv="refresh" content="10; URL=pagetoredirectto.php">

 

content is where you place the seconds to wait. that one waits 10 seconds and send to "pagetoredirecto.php"

 

Snooble

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.