7 Replies Latest reply on Aug 30, 2010 4:49 PM by chris.campbell

    open html's link in system's browser

    marianorauch
      I need help!!
      I need open link in System's browser.
      HTMLLoader has navigateInSystemBrowser property but how do you set this value?. I need a example, please.
      I don't like open link with air.navigateToURL(url) .
      see you.

      My html page is:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns=" http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">

      <head>

      <link rel="stylesheet" type="text/css" href="js/ext-2.1/resources/css/ext-all.css" />
      <link rel="stylesheet" type="text/css" href="js/ext-2.1/air/resources/ext-air.css" />
      <!-- link rel="stylesheet" type="text/css" href="css/feeds.css" /-->

      <script type="text/javascript" src="js/AIRAliases.js"></script>
      <script type="text/javascript" src="js/AIRIntrospector.js"></script>
      <script type="text/javascript" src="js/ext/ext-base.js"></script>
      <script type="text/javascript" src="js/ext/ext-all.js"></script>
      <script type="text/javascript" src="js/ext/ext-air.js"></script>
      <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>

      <script type="text/javascript" src="js/app/windows.js"></script>
      <script type="text/javascript" src="js/app/msg.js"></script>
      <script type="text/javascript" src="js/app/app.js"></script>
      <script type="text/javascript" src="js/app/html.js"></script>
      <script type="text/javascript" src="js/app/login.js"></script>
      <script type="text/javascript" src="js/php.js"></script>


      <title> </title>
      <script>
      //abre los links en el Navegador por default
      function openLink(url) {
      var variables = new air.URLVariables();
      var request = new air.URLRequest(url);
      request.data = variables;
      try {
      air.navigateToURL(request);
      }
      catch (e) {
      // handle error here
      }
      }

      function init() {
      }
      </script>
      </head>
      <body onload='init()'>
      <script type="text/javascript">


      Ext.onReady(function() {
      var win = new Ext.air.NativeWindow({
      id: 'windows',
      trayIcon: 'img/inyim.png',
      instance: window.nativeWindow,
      minimizeToTray: true,
      trayTip: 'Inyim',
      trayMenu : [{
      text: 'Open Inyim',
      handler: function(){
      win.activate();
      }
      }, '-', {
      text: 'Exit',
      handler: function(){
      air.NativeApplication.nativeApplication.exit();
      }
      }],
      width:300,
      heigth:400,
      resizable: true,
      visible:true
      });

      //application.init();
      win.show();
      });

      </script>
      <a href=" http://www.google.com.ar">ir</a>
      </body>
      </html>