2 Replies Latest reply on Jan 5, 2009 10:45 AM by rtalton

    navigateToURL & httpServices help ?

      Hi all,

      I would like to have your idea how to solve the problem.
      The case is I have a shopping cart site and there is a button for customer to checkout. The button is with a listener for mouse click event. After event fire, updating database information, only after the database is updated, then fire a naviagateToURL to payment gateway with passing simple POST data, the target is "_blank";
      The problem is browser will block any popup window not from mouse click event, if the the target is "_blank". But also I want to make sure database is updated, when passing data to payment gateway company. If the target is "_self", then it works but I hope to use the target with "_blank";
      thanks for your help
        • 1. Re: navigateToURL & httpServices help ?
          ntsiii Level 3
          If a user has pop-ups are blocked, you can't prevent that with code. You could do something like have directions on the screen saying what to do if the window does not appear.

          Have you tried navigateToURL without specifying a window?

          • 2. Re: navigateToURL & httpServices help ?
            rtalton Level 4
            If the window is not specified, a new empty window is created.
            The docs have this to say:
            "In Flash Player 10 and later running in a browser, using this method programmatically to open a pop-up window may not be successful. Various browsers (and browser configurations) may block pop-up windows at any time; it is not possible to guarantee any pop-up window will appear. However, for the best chance of success, use this method to open a pop-up window only in code that executes as a direct result of a user action (for example, in an event handler for a mouse click or key-press event.)"

            I'm targeting Flash Player ver. 9, and get the same behavior.
            I use navigateToUrl a lot. Hope someone can find a way to get around popup blockers!