HTML window in AIR app can't open new window

Hi, By allowing HTML content to be displayed inside our AIR app it's possible for our partner organization to write their own custom features hosted on HTML pages at their site, but for their content to appear integrated seamlessly within our AIR app's container so that it looks like it belongs there...
We've successfully got an HTML window within our AIR app that navigates to content in a sub-folder on a web-hosted domain. Content displays correctly and hyperlinks function within the HTML window as we'd expect apart from three scenarios that appear to be manifestations of the same problem:
A hyperlink on a page shown in-app with a link to a PDF stored on the web server has no action
A hyperlink on a page shown in-app with a link to a video file stored on the web server has no action
A hyperlink on a page shown in-app with a link to another site (target="_blank" parameter) has no action
All three hyperlink scenarios work as we'd wish if we navigate to the page in a standard browser.
How can we code the HTML so that we can display selected content in an HTML window inside the AIR app; but have selected hyperlinks invoke the user's standard web browser, or launch Adobe Reader, or play a video file etc?
Note, we understand how to do those things within AIR itself, but can't figure out how to achieve this from inside the HTML window in the app.

Hello,
As to "_blank" links:
this is long-standing lacking feature - as there is no introspection of event of such type - so it goes and could not be prevented. One could either handle all navigation with system browser (all links open in system external browser) or handle them in embedded browser - similar issue is bugging people using phoneGab with jQueryMobile - application eats all external links or none at all). There are solution for that including runtime introspection of DOM object to retrieve all anchor (a) tags in rendered document and attach custom click handler via host object like on complete:
var document:Object = html.htmlLoader.window.document;
if(!document && !document.hasOwnProperty("getElementsByTagName")) return;
var linksArray:Object = document.getElementsByTagName("a");
if(!linksArray) return;
var a:Object = null;
for(var i:Number = 0; i < linksArray.length; i++)
     a = linksArray[i];
     if(a)
          a.onclick = function(event:Object):Boolean
               if(event.target.hasOwnProperty("href") && event.target.hasOwnProperty("target"))
                    if(event.target.target != "_blank") return true;
                    flash.net.navigateToURL(new URLRequest(event.target.href));
               return false;
but if you have control on what content is provided you could take care of handling links depending on runtime feature detection that way in javascript:
<script type="text/javascript">
     function handleClick(a)
          if(!window.runtime) return true;
          if(a.hasAttribute("target") && a.getAttribute("target") == "_blank")
               var href = a.getAttribute("href");
               var req = new window.runtime.flash.net.URLRequest(href);
               if(req) window.runtime.flash.net.navigateToURL(req);
          return false;
</script>
<a     href="http://www.bbc.co.uk/" target="_blank" onclick="handleClick(this);">BBC</a>
<br />
<a href="http://www.google.com/" onclick="handleClick(this);">Google</a>
(above could be scripted globally with help of jQuery for example for all links without much coding).
In 2.7 there is new event introduced to help with introspection so one could prevent event if link is internal and do whatever is expected in application:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
If you post some details on how PDF and video content is expected to be shown in html I'm sure someone would share some hints as well,
regards,
Peter Blazejewicz

Similar Messages

  • Can't open new windows if clicking on a link!

    For some reason I can't open new windows if I clic on a link. It's alright if it opens in a new tab, but if it opens in a new window, the window that opens is just blank. I have no idea why it's doing so, it started a couple of weeks ago, and it's very annoying. I guess it has something to do with securityoptions, but I haven't been able to sort it out. Would be very glad if anyone should have an answear to this!

    Try These Possible Solutions:
    1. Restart Firefox and your computer.
    2. Use the keyboard shortcut CTRL+T to open a new tab.
    3. Run firefox in safemode (no add-ons) Go to start>all programs>Mozilla Firefox

  • Mac user OS 10.6.8 Firefox 6.0.2. Click the Firefox icon in dock, program does not open new window. Type cmd+N to open new window, cmd+T to open new tab or cmd+L to enter URL, nothing happens. What causes this, and what can be done?

    Mac user OS 10.6.8 Firefox 6.0.2. Click the Firefox icon in dock, program does not open new window. Type cmd+N to open new window, cmd+T to open new tab or cmd+L to enter URL, nothing happens. What causes this, and what can be done?

    It's strange. The problem apparently resolved itself after I ran TechTool on it. When I clicked on Firefox last night, I had no problem opening a window. Thanks for your help. (As to your previous post, the focus was on Firefox and neither the speed keys nor the menu bar would open a window or tab of allow me to enter a URL to open a window. Strange!)

  • I can not open new windows

    When I´m on the internet I can not open new windows, not by ¨file new windows ¨ or by ctrl N. New tabs work but no new windows. It worls well with all other browsers.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 10.0 r32
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/

  • I can't open new windows and add-ons aren't working.

    I recently scrubbed my hard drive due to virus issues in order to contain the virus before it spread. After installing Firefox I noticed that I was unable to open new windows, links that normally opened a new window for Firefox weren't working, and I can't access plug-ins like AdBlock Plus which I used frequently before. I've never had this problem before. I turned off all security settings and unplugged from the internet to see if that was the problem, but that didn't work. I also tried uninstalling and reinstalling Firefox, same deal.

    Hello Anand, '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".[[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    thank you

  • I can't open new windows for my firefox

    Hi,
    I am not able to open new windows in Firefox (Version 31.0) on my Windows 8 PC. When I click the open new window, it doesn't makes any effects.
    This started from yesterday evening, can you please let me know how can I get this resolved?
    Regards,
    Anand.

    Hello Anand, '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".[[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    thank you

  • Finder won't stay selected if other programs open and can't open new window

    I have just noticed a new problem. If other programs are open, Finder won't stay selected program. If I alt tab to it or click on it in dock, it shows on menu bar for a half second and goes away. If I right click on icon in dock and select open new window, it will not do so. If I select a folder from the desktop, it opens in Finder with no problem and I can move within the Finder at will.
    I have updated all software. I am running the current Macbook Pro 15in. No other problems noted so far.
    Any ideas? Thanks in advance

    Hi Sleddaddyfro, and a warm welcome to the forums!
    Do you have another account you can log into?
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for action in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport in 10.4 & below, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Stuffit AVR has been a big one, if you have that use the Pref Pane to turn it off, but others have been implicated too. Check System Preferences for a Stuffit Pref Pane and disable AVR.

  • Can't open new window

    When I hit command N for a new window I don't get one. And no, it doesn't open a new tab either. I'm using OS 10.7.2 on an imac and I'm using firefox 8.0.1 In preferences, I've got it set NOT to open a new window in a tab instead. I just can't get a new window. Period.

    I have never heard of this happening before, and if the other apps are responding when you tap on that portion of the screen, it would seem that the problem is not with the screen itself - or the iPad itself.
    Start with something basic. Quit Safari completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    And try this as well. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • How can I open new window from a link in another window?

    Hello everyone!
    Can anyone help me with my problem. I need to open a child window from a link in the mother/master window. Actually, the link that would open the child window is directed to a servlet that retrieves data from the database. The data will then be displayed in the child window. I don't how to open a new window with the data retrieve (thru the servlet) displayed in it. I'm using model 2 architecture (Servlet-JSP).
    Thank you in advance and more power!
    nicoleangelisdaddy
    [email protected]

    Or you can use something like this,
    Click and in your test()
    <script language="javascript">function test()
          document.form_name.target="_blank";
          document.form_name.action="/test/servlet/LoginServlet";
          document.form_name.method="post"
          document.form_name.submit();
    }</script>
    Here "/test" is your application context path.
    If you want to open the link in the named window then use,
    document.form_name.target="your_own_name";

  • Windows\system32\QUARTZ.dll can't open in Windows.  Can't use Premiere Elements.

    I am looking for a way to get a solution to this error which keeps preventing me from opening my Premiere Elements 11 program.  I have previously used the program without any problems.  But last week I had a new HDD installed in my laptop (Dell Studio XPS 1640 running Windows 7 Ultimate 64-bit).  Now I can't open Premiere Elements and can't edit my videos. 
    When I try to open the program, I get an error which reads:
    Font Capture: Adobe Premiere Elements.exe - Bad Image
    C:\Windows\system32\QUARTZ.dll is either not designed to run on Windows or it contains an error.  Try installing the program again using the original instalation media or contact your system administrator or the software vendor for support
    My computer technician did use an image of my laptop to transfer everything onto the new HDD.  I have no idea if that is relevant to this software problem.
    I posted this question previously and was directed to a link which instructed me to update my DirectX and other graphics drivers.  I did all that already.  I still can't open Premiere Elements.  I want to ask Adobe Support, but since they just launched Premiere Elements 12, I guess I no longer get direct support from Adobe? Not sure but that is how it seems to work.  I will try any advice given to resolve this issue, if anyone has ideas.
    Thanks!
    Janeen

    Did you try reinstalling as indicated by the error message?  Transferring images is not a good way to install Adobe programs.

  • Can`t open new window in my browser...

    I go to my Google Icon in the top toolbar, right click on it to get the drop down menu, then click on Open in New Window and nothing happens...and it really weird because now...just at this moment the Google Icon disappeared. Is there any way I can go back to an older version of Firefox or something because I never had any problems before. On top^of that I can;t find the some addons that I installed, and in fact when I click on Addons under Tools nothing happens either...Please advise!!!!!!

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    In Firefox 4+ you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • It says I can't open new window cause I have reached max allowed. How do I fix this?

    When I try to open a new window, I have a message pop up that says it could not open a new window cause I have already opened the maximim number. Don't understand how this is possible when I am sure I close out each one when I am done with it. How can you fix this?

    Yes that is a limit of web some web browsers, they need to close any open browsers windows but without know which browser they have exact instruction is hard,,, mustangman5058 can you supply more information.. Like Cody asked is this a web browser you are speaking of and if so which browser are you using?
    Opera Mobile or Dolphin HD allows the most windows to be opened at the same timefor me.

  • Can not open new windows with the update

    i used to be able to open multiple windows with different url and i now i can not...

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Can't open new windows in Safari 5.1.2 for Snow Leopard

    I have downloaded the 10.6.8 combo update and of course installed the new version of Safari.  Now I cannot open a new window (whether it is a link or if I do apple-n on the keyboard).  I must be missing something here that must be very simple to fix this, but I have tried everything.  I might have to find an old link to a 5.1.1 site and download that version again (it was working fine before I downloaded the new version)
    Any help would be appreciated!  THANKS!

    Try emptying the cache and resetting Safari.
    From your Safari menu bar click Safari > Empty Cache. Try a new window.
    If that didn't help, back to the menu bar, click Safari > Reset Safari. Select the top 5 boxes, click Reset. Try again.
    If that didn't help, go to ~ / Library / Caches / com.apple.Safari / Cache.db
    Move the Cache.db file from the com.apple.Safari folder to the Trash and restart your Mac.
    Try again.
    ~ (Tilde) character represents the Home folder.

  • Can't open new windows in safari

    I have been using safari for years. I upgraded to the safari 3.0 Beta some weeks ago and had no problems everything ran fine. I have done nothing irregular and today I fired up my computer - opened safari and found that no window would automatically open. I tried to open a new window - nothing.
    I tried opening a new tab which opened a window but no toolbar and a tab twice the width. then went to view to view toolbars which then loaded up but any address or google search is not recocognised.
    I have gone thru everything including deleting all safari files, uninstalling beta and full reinstall no luck, no change.
    Has anyone got any suggestions or seen this problem before.

    Is there a way to revert to Safari 2.0?
    Yes, as AussyWesty says, the Safari beta installer includes an uninstaller. Run that, and you will be reverted to Safari 2. Whatever you do, do not throw away or move the Safari 3 beta application. The uninstaller has to see that application in place in order to do its work.

Maybe you are looking for

  • How I reset my Battery Statistics without ROOTING the phone.

    All, You might try this to reset your Battery Usage calculation statistics.  It worked for me and it does NOT ROOT you phone. To save time do this before you go to bed. Turn your phone off by holding the on/off button until the phone turns completely

  • PO created instead posting block set & vendor not extended to company code!

    Dear friends, I have a vendor created for a purchasing organisation in  a company code. there are two problems that i am facing. 1) I have  blocked  a particular vendor completely. Even then system is allowing to create the PO using this vendor. 2) T

  • Numbers syntax problem

    I use this equation in Ms Excel. Numbers does not seem to like it. I'm trying to identify a column and a random row between two mumbers. Here is the EXCEL equation: INDIRECT("q"&INT(RANDBETWEEN(50,52))). In EXCEL, it will go to column "q" and select

  • Lost videos in iPhoto when upgraded to OS X Lion

    When I upgraded to OS X Lion, all my videos were removded from iPhoto, and had been moved to iMovie.  At least I think they are all in iMovie, I actually don't know as there were several videos imbedded in different 'events' in iPhoto.  How do I make

  • Is there any way to recover google searches after clearing form data?

    I cleared Saved Form Information which has erased my Google searches. Is there any way to restore these searches?