Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.