title: Run javascript inside HTML component in Adobe AIR Flex 4?
body: <p>I have the following component in an AIR application from Flex 4:</p>
  
  <pre><code>&lt;mx:HTML id="viewObject"
           x="10" y="42" width="634" height="313"
           location="http;//localhost:8080/mypage.php" /&gt;
  </code></pre>
  
  <p>Now I want to run a javascript when the page loads but the javascript isn't inside the target page. I want to run the following javascript:</p>
  
  <pre><code>javascript:alert('Hello world.');
  </code></pre>
  
  <p>I tried approaching it by setting the <strong>location</strong> property again to the javascript after the page has loaded like below.</p>
  
  <pre><code>&lt;s:Button x="10" y="10" label="Button"&gt;
      &lt;s:click&gt;
          &lt;![CDATA[
          viewObject.location = "javascript:alert('hello world');";
          ]]&gt;
      &lt;/s:click&gt;
  &lt;/s:Button&gt;
  </code></pre>
  
  <p>Unfortunately for me, that doesn't seem to work. Can anybody help me out with this problem?</p>