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

    html component not loading the java script file


      I am using java script files ..  to run few functions during html load operation.

      the html component is behaving very differently some times its running some times its not running.


      how to ensure to load the java script during html load operation.

      the sample html file






      <SCRIPT SRC="file://D:/softwares/jsMath-3.6e/easy/load.js"></SCRIPT>

      <body lang=EN-US>

      <div class="Section1">

      <p>Reddy <span class="MTConvertedEquation">[tex]\mathop {\lim

      }\limits_{x \to \infty } \sqrt {{b^2} - 4ac} [/tex]</span> </p>





      I am ensuring to keep the load,js file in the above mentioned directory .


      the script file is not getting loaded into html component.


      Any help is highly appreciated.



        • 1. Re: html component not loading the java script file
          Umal Kumar Adobe Employee

          You can use the code for html component in AIR and this will inturn load the js file you are trying to load and functions accordingly on action on html component

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




          Let me know if this works..