1 Reply Latest reply on Jun 27, 2012 6:48 AM by Umal Kumar

    HTMLLoader window.open is not working

    nITiNkIlLeRmEeRuT Level 1

      Hi frnds,


      I have a web project developed in Flex which I have to make work standalone using AIR.


      I created Air project and loaded the web application using flash.html.HTMLLoader.

      The content is loading fine and working.


      There are few buttons which open different links using javascript functions window.open.


      The links are not opening. The javascript function is getting called using ExternalInterface and I placed alerts in that which is displaying.


      The function contains simple window.open




      I tried several solutions mentioned but none of them are working.






      Kindly provide any assistance for this.

        • 1. Re: HTMLLoader window.open is not working
          Umal Kumar Adobe Employee

          I created a small application and I am able to use the window.open in the new window in default browser of the system.



          <?xml version="1.0" encoding="utf-8"?>

          <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"


                  xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" creationComplete="windowedapplication1_creationCompleteHandler(event)">



             import mx.containers.Panel;

             import mx.core.IVisualElement;

             import mx.events.FlexEvent;


             protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void


              // TODO Auto-generated method stub

              var urlReq:URLRequest = new URLRequest("test.html");

              html.htmlLoader.navigateInSystemBrowser = true;








          <mx:HTML id="html"/>







          <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
          <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
          <title>My Test Page</title>

          <script type="text/javascript">


          <h2>Hello Welcome</h2>


          Let me know if this worked.