0 Replies Latest reply on Mar 13, 2010 3:37 AM by Dauntless

    htmlComp.location = "...#anchor" doest work with loading images




      The problem: If there are images in the page you load with the HTML component, the anchor positions aren't calculated correctly.


      I've made a little example which can be downloaded here:
      http://www.dauntless.be/Temp/example.zip (mxml, html & jpg file)


      <html><head></head><body><a href="#test">Click</a><br /><img src="img.jpg" /><br /><a name="test">Anchor</a></body></html>
      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication width="500" height="500" creationComplete="init()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
                  private function init():void
                      browser.location = "test.html#test";
          <mx:HTML x="10" y="0" id="browser" width="100%" height="100%"/>


      When the application launches, the webpage is still at the top. When I click the <a href="#test"/> it jumps to the correct position.


      How can I fix this? Is there a certain event I can wait for to send the hash tag to the page?


      Thanks for reading!