...

View Full Version : Google Chrome Redirect Problem



klakin
07-11-2011, 09:25 PM
I need to display a receipt, open the print dialog and then go back to another form.

My code is as follows at the bottom of the page:


<script type='text/javascript'>
window.print();
window.location="newlocation";
</script>


It works prefect in firefox, but not in chrome.
In Chrome it just redirects and never waits for the print dialog.

I need it to wait until the user can click print or cancel. If I take out the window.location line it brings up the print dialog (but I want it to redirect afterwards).

Thanks to anyone who can help!

sunfighter
07-11-2011, 11:50 PM
Attach the redirect to the print/cancel buttons.

klakin
07-12-2011, 04:00 PM
how? I thought the print and cancel were part of the browser. But that would be great I would like to go to a different page depending on if they hit ok or cancel.

sunfighter
07-12-2011, 08:08 PM
Sorry, Only me shooting from the hip again. Though you were controlling the printing.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum