Reputation: 1562
I am rendering a HTML page in flex using the htmlloader component. The html content has an anchor tag clicking on which should launch the webpage in the browser.
This anchor tag doesn't work.Do we have to use an intermediate communication of JS to AS(actionScript) to make this work? This is the code I am using to render the html in flex
html.location = "https://my_url?path=get_notifications";
Html snippet
<a href="url" target="_blank">Go to web</a>
Upvotes: 1
Views: 562
Reputation: 227
The issue comes from the HTMLLoader's handling of target="_blank". If you want the HTMLLoader to handle _blank you will need to create a custom htmlHost for the HTMLLoader (HTMLLoader.htmlHost). This custom htmlHost will need to override the createWindow function and that will handle the _blank case. More information about this is available from the following links:
Adobe - Defining browser-like user interfaces for HTML content
Forrst - enable link with target='_blank' in Adobe AIR HTMLLoader component
Sonke Rohde - AIR HTML with “_blank” Links Part II – Using HTMLHost
Upvotes: 1