21 Replies Latest reply: May 25, 2012 3:22 PM by marciohdantas2012 RSS

    BUG: navigateToUrl always opens new tab in browser, also when window parameter is specified

    Karel VDH

      I have a problem navigating to a Url in the default browser in an Adobe Air project.


      air.navigateToUrl(request, windowName) launches the browser and displays the page, but it displays a new tab for every request.


      Here is a very simple example that shows the problem:




      <?xml version="1.0" encoding="utf-8"?>

      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"





      import flash.display.Sprite;

      import flash.net.navigateToURL;

      import flash.net.URLRequest;


      protected function button1_clickHandler(event:MouseEvent):void





      public function NavigateToURLExample():void {

      var url:String = "http://www.adobe.com";

      var request:URLRequest = new URLRequest(url);

      try {           

      navigateToURL(request, "testWindow");


      catch (e:Error) {

      // handle error here







      <s:Button x="169" y="165" label="Button" click="button1_clickHandler(event)"/>









              <script type="text/javascript" src="lib/air/AIRAliases.js"></script>      



              <a href="#" target="testp"  onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'TestWindow');return false;">Same Tab</a>





      How can I open the url in the same window/tab?


      Message was edited by: Karel VDH