1 Reply Latest reply on May 10, 2011 2:27 AM by Karel VDH

    Bug in navigateToURL? (AIR HTML/JavaScript) window name parameter not working

    Karel VDH

      Hi,

       

      I have to popup the default browser from a HTML/JavaScript application.

      All links on the Air page should be opened in the same tab in the same browser window that was opened by the first click on a link.

       

      The code I use is

      var urlString = "http://www.adobe.com";

      var request = new air.URLRequest(urlString);

      air.navigateToURL(request, "myNewWindow");

      The myNewWindow parameter does not seem to be taken into account:  a new tab is opened on every click.
      I created a new Air application in Aptana and added the following straightforward code to it:
      <html>
          <head>
              <title>navigateToURLTest</title>
              <script type="text/javascript" src="lib/air/AIRAliases.js"></script>       
          </head>
          <body>   
                  onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'AirTestWindow');return false;">New Tab</a>
              <br />
              <a href="http://www.adobe.com"
                  onclick="javascript:air.navigateToURL(new air.URLRequest('http://www.adobe.com'), 'AirTestWindow');return false;">Same Tab</a>
          </body>
      </html>
      Same problem.
      Does anyone have any idea?
      Thanks