Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Google Chrome Redirect Problem

    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:
    Code:
    <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!
    Last edited by klakin; 07-11-2011 at 09:29 PM.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,462
    Thanks
    23
    Thanked 634 Times in 633 Posts
    Attach the redirect to the print/cancel buttons.

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Last edited by klakin; 07-12-2011 at 08:04 PM.

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,462
    Thanks
    23
    Thanked 634 Times in 633 Posts
    Sorry, Only me shooting from the hip again. Though you were controlling the printing.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •