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!
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!