View Full Version : [Adobe AIR] Basic HTML and JS help

Feb 9, 2009, 02:42 AM
Sorry for posting Adobe AIR questions here, but its a part of Mac programming and Adobe forum has no activity at all.

I have made an app that displays a html file. I have also made a javascript file with the following code (Does not work):


When the js is called, I want the window to navigate from the html file to the URL (website.com).

Any ideas on how do I do this ??


Feb 9, 2009, 03:58 PM
It depends on where you're trying to show the link.

If you want it to open in a new window:

navigateToURL(new URLRequest('http://www.website.com'));

Or, in an existing HTML element:

myHtmlElement.location = 'http://www.website.com';

Note that the second code snippet crashes my quick-test Air app, but I think that's how it should work.