Hi Pablo,

   This is most probably a bug, which should be getting fixed in the 
upcoming release of AIR.

   You can get the full blog entry for this problem at 
http://srinivasannam.wordpress.com/

   Check the below code for a simple workaround.

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
        <mx:HTML id="htmlComp" width="100%" height="100%" 
location="http://www.adobe.com"; complete="addEventListenersToLinks
(event)"  />
        
        <mx:Script>
                <![CDATA[
                        
                        private function addEventListenersToLinks
(e:Event):void
                        {
                                var dom:Object = 
e.currentTarget.domWindow.document;
                                var links:Object = 
dom.getElementsByTagName("a");
                                
                                for(var i:Number = 0; i < links.length; 
i++)
                                {
                                        if(links[i].target.toLowerCase
() == "_blank" || links[i].target.toLowerCase() == "_new")
                                                links[i].onclick = 
linkClickHandler;
                                }
                        }
                        
                        private function linkClickHandler(o:Object):void
                        {
                                navigateToURL(new URLRequest
(o.currentTarget.href),"blank");
                        }
                ]]>
        </mx:Script>
</mx:WindowedApplication>

Thanks and Regards
Srinivas Annam

--- In flexcoders@yahoogroups.com, "Pablo Godel" <[EMAIL PROTECTED]> wrote:
>
> I am trying to use the HTML component to load an external website into
> an Adobe AIR app. It works fine, but if the website has a link or
> button that opens a popup window, the window never opens.
> 
> Any idea if this is supported and how to solve the problem?
> 
> Thanks
> Pablo
>


Reply via email to