window.runtime propertywindow.runtime.flash.net.navigateToURL()

function navigateToURL(request:URLRequest, window:String)

Opens a URL in the default system browser.

Parameters
request:URLRequest — A URLRequest object that specifies the URL to navigate to.
 
window:String (default = null) — The browser window or HTML frame in which to display the document indicated by the request parameter.


Example
The following example opens the URL http://www.adobe.com in a new browser window and passes data about a user session, captured in a URLVariables object, to the web server.
<html>

    <head>
      <script src="AIRAliases.js" />
      <script>
        function init() {
            var url = "http://www.adobe.com";
            var variables = new air.URLVariables();
            variables.exampleSessionId = new Date().getTime();
            variables.exampleUserLabel = "Your Name";
            var request = new air.URLRequest(url);
            request.data = variables;
            try {            
                air.navigateToURL(request);
            }
            catch (e) {
                // handle error here
            }
        }
      </script>
    </head>
    <body onload='init()'>

    </body>
</html>

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/air/1/jslr/flash/net/navigateToURL.html