2 Replies Latest reply on Feb 6, 2008 12:22 PM by SonomaIT

    navigateToURL() New Window Foiled by Popup Blocker

    SonomaIT
      Im currently using the following line of code to open a new window with the URL specified...

      navigateToURL(new URLRequest(' http://www.mysite.com'), '_blank');

      However, pesky Internet Explorer is blocking the new window as a popup everytime - Is there a documented way to get around such an issue?
        • 1. Re: navigateToURL() New Window Foiled by Popup Blocker
          Flex harUI Adobe Employee
          It should work if you're opening the window in response to a user click. Otherwise, you pretty much can't get around it
          • 2. navigateToURL() New Window Foiled by Popup Blocker
            SonomaIT Level 1
            I should have prefaced this better by saying the setup looks like this in its complete form...

            <mx:Canvas x="10" y="22" width="220" height="31" backgroundColor="#ffffff" backgroundAlpha="0.01" buttonMode="true" click="onLogoClick()" id="canvas1"></mx:Canvas>

            Seems that the forum butchered my code, but very basically - Its a canvas item with a click event handler that executes the function below..

            private function onLogoClick():void {
            soundGlobal.play();
            navigateToURL(new URLRequest(' http://www.mysite.com'), '_blank');
            }

            I assume this should still work on the same premise of opening in response to a user click...