1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

[Adobe AIR] Basic HTML and JS help

Discussion in 'Mac Programming' started by jashsayani, Feb 9, 2009.

  1. macrumors regular


    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 ??

  2. macrumors 6502

    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.

Share This Page