Loading all website links in one window

Does anyone know how to capture / prevent links from opening a new window in Air?
I am an ajax developer and I have several sites that load in an iframe in my air application.
One of the sites has links that open in a new window. Is there anyway to keep it from openning in a new window and instead, open the link in the iframe?
I don't own those sites so no, I can't just change the target on the links themselves.
Thanks!

One approach would be overriding window.open. However, this can only be done in ActionScript since it requires extending a class. There's an example in the AIR Developer's guide (which I see you have commented on already). Your situation is a bit more complicated than the examples in the docs because you are loading remote content into an iframe. You might have to experiment to figure out if the HTMLHost location() functions are called when a link in an iframe is followed. (I don't know.) If so,  you could try passing a reference to the iframe object to your HTMLHost class when you create it and use that reference to load the URL given to you by the location() function's locationURL argument into the correct place.
Another tactic would be to walk the DOM of the iframe and rewrite the link objects so that they open in the same window.
Still another would be to intercept an appropriate event on the iframe object and prevent the default behavior so that you can force the link to load in the desired iframe.
(Using  air.HTMLLoader.createRootWindow wouldn't help here as it creates an entirely new window.)

Similar Messages

  • Firfox 8 is sometimes very slow to load random websites and others it loads quickly, IE8 loads all websites ok. Have cleared cookies and cache and allowed ff as exception in Windows firewall.

    I use FF 8.0 (x86en-US) as default browser, since update to 8.0 FF intermittently takes ages to load some websites, sometimes not loading the site at all. To rectify this I go back one page to the Google results or hyperlink and ask FF to load the webpage again. This usually solves the problem but not always. I have cleared cookies and cache and added FF to exceptions in windows firewall. The websites affected are not always the same and some that load quickly one day can take ages next time. IE8 loads all websites OK. Antivirus and malware scans all clear.

    I use FF 8.0 (x86en-US) as default browser, since update to 8.0 FF intermittently takes ages to load some websites, sometimes not loading the site at all. To rectify this I go back one page to the Google results or hyperlink and ask FF to load the webpage again. This usually solves the problem but not always. I have cleared cookies and cache and added FF to exceptions in windows firewall. The websites affected are not always the same and some that load quickly one day can take ages next time. IE8 loads all websites OK. Antivirus and malware scans all clear.

  • Firefox cannot load all websites in e10s window. But Firefox can load all websites in e10s window.

    Firefox cannot load all websites in e10s window. But Firefox can load all websites in e10s window.
    It shows mostly, Tab crashed Well, this is embarrassing.
    Well, this is embarrassing. We tried to display this Web page, but it's not responding.
    Tell Mozilla about this crash so they can fix it.
    Or sometimes for the last tab it shows :
    Websites show a spinning wheel and never finish loading
    Of course other browsers works 'perfectly' onto loading sites.
    What can I do. Is this an e10s bug, that I could help to qualify and how?
    Also looking for a workaroud. I want to restore my tabs onto a non-e10s window, but really don't figure how to do that. Means, after relaunching FF-nightly, restore my windows and tabs.
    He still give me this message :
    Nightly is having trouble recovering your windows and tabs. blah blah...
    I want to disable e10s as of for now, until he will maybe work again.

    If you would like to disable e10s please follow these steps:
    https://wiki.mozilla.org/Electrolysis#Enabling_and_Disabling_Electrolysis
    Don't worry e10s is getting better every day. It's just a matter of time and hard work.

  • How can I get websites to open in free-standing windows instead of all stacked up in one window?

    If I have a window open and click on a link to open another, they all stack up in one window instead of opening a new free-standing window. How can I change this?

    I am male, so in your eyes I am a god. I'm glad I could help!!

  • Hi: my mac air safari is not loading all websites since i upgraded my software.. it download only few website and crome in the mac is not responding at all.. what to do please advise ???

    Hi: my mac air safari is not loading all websites since i upgraded my software.. it download only few website and crome in the mac is not responding at all.. what to do please advise ???

    Safari Problems
    Safari - Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    Try setting up another admin user account to see if the same problem continues. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

  • HT5616 I have multiple phones and iPads and all are linked to one iCloud account and one iTunes Account.  I want to keep the same iTunes Account so I can share music, etc., however, I want each device to have its own iCloud account.  How do I do this?

    I have multiple phones and iPads and all are linked to one iCloud account and one iTunes Account.  I want to keep the same iTunes Account so I can share music, etc., however, I want each device to have its own iCloud account.  Any help on how I can I do this?

    You'll need to create an Apple ID for each device. Use the new Apple ID for FaceTime, iMessage and iCloud on the device. Use the original Apple ID for Settings>iTunes & App Store.

  • Forbidding all websites except for one or two?

    Is there a way to forbid all websites expect for one or two sites? We are looking into getting a couple ipads for our business but need the employes not to use them for personal use.  Please help!!

    General -> Restrictions -> Websites
    In that section select "Specific websites only" and you can enter in the sites you want your users to be able to access. Note that to the best of my knowledge it applies only to the built-in web browser, Safari, so you'll need to also turn off the ability to install apps or your users can just download some other browser.
    Regards.

  • Both Firefox 12 & 13 take forever to load all websites. Firefox 11 works great. What did you change to cause this problem starting with 12?

    I keep having to go back to 11. Supposedly 12 was to be faster. Instead it takes minuets to load every website. I have tried several betas of 13 with the same problem.

    Did you try a new profile for the Firefox 13 version?
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    You can try the portable Firefox version that comes with its own profile folder.
    *http://portableapps.com/apps/internet/firefox_portable
    You can install multiple Firefox versions via a custom install in different installation folders.<br />
    Do a custom install and install each version in its own program folder to use multiple Firefox versions.
    * https://support.mozilla.com/kb/Custom+installation+of+Firefox+on+Windows
    Make sure not to start Firefox after the installation has finished.
    Create a new profile exclusively for each Firefox version.
    Create a desktop shortcut with -P "profile" appended to the target to launch each Firefox version with its own profile.
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • How do I stop new tabs from opening - all I want is one window that I can click back and forth on the page history

    I do not want multiple windows or multiple tabs. In older Firefox versions just one window could be set, using the page history to go backwards or forwards. How do you disable new tabs or new windows from automatically opening in firefox 7?

    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
    See also:
    * http://kb.mozillazine.org/browser.link.open_newwindow (3)
    * http://kb.mozillazine.org/browser.link.open_newwindow.restriction (0)

  • How to open a website link in new window

    I have created a flash website which contains a link to an outside website. When I click on the link, it takes me to that outside website in the same browser window. To go back to my website, I have to use the back arrow. I want to change the link to the outside website so that the link opens in a new window. Therefore, if somebody goes to the link, when they finish they can close the new link's window and the original window with my website will still remain, without losing both upon closing.
    What do I need to adjust in order to do this?

    var url:URLRequest = new URLRequest("http://www.adobe.com"); navigateToURL(url, "_blank");
    getURL/navigateToURLThis method uses the getURL (ActionScript 2.0) or navigateToURL (ActionScript 3.0) command to create a new browser window by targeting a new, blank window. This method is simple, works on all browsers, and requires no JavaScript. This method, however, it does not provide control over window location, size, scrollbars, or toolbars.    I guess something like this you needed?

  • Open all html pages in one window w/button

    I'm trying to figure out how to have all of my pages for my
    site open under one browser window instead of opening up a new
    window when each button is clicked.
    I built Flash buttons for the pages and they work fine...they
    just open up the pages in individual windows.I'm new at this and
    haven't figured out how to get the pages to open up in the main
    (index.html) browser window. I've tired doing it using in
    Dreamweaver the Add Behaviors, GoToURL selection but it doesn't
    work...
    Also, I'm not using frames within Dreamweaver....
    Here is the code for the flash button that I tried and it
    didn't work....
    The 2nd block of code is what I used to open the pages and it
    does work...
    Any help would be appreciated and well worth a cold pint when
    we meet!
    Bob Davis
    dp Davis Productions....
    =

    Strangely yes you do.
    iChat invokes the same A?V protocols from any Buddy list.
    If the person at the other end is on iChat or AIM on a PC then it will be able to Video or Audio chat to them.
    It will not be able to Video chat to MSN or Yahoo or Jabber only Buddies (those clients that can't Video chat or don't use the same protocols as iChat and AIM).
    The exception is to people on a OS X server network with the iChat server which is actually a Jabber server - but the individual users will be using the iChat Client.
    9:59 PM Thursday; November 1, 2007

  • I am having issues with a site for work. it loads all the links on the left side of the screen. is there a way to fix this or get an older version of fire fox?

    Its my office intraweb and I was told its not compatible with this upgrade

    You can try basic steps like these in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and the cookies from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to receive all website news in one place?

    many websites do not have a mac push-notification option. is there any way i can centralise all those websites' news? any app? liking the pages on facebook does not please me, as some site articles aren't posted there.

    Hi Guys,
    Thanks for the responses.
    Well yes, I was hoping for a magic 'Repeat Function, and sort of thougth I had used something like that before...but could nto remember what it was called.
    I have been following the answers all day , but have been on and off aircraft all day and have nto been able to find time to try anything out or respond
    I did try the mail merge option...but the pages documetn always had the Mail Merge option greyed out.
    Eaarlier I just created the label i wanted and copied and pasted, but the Alt Option  way is much easier...that combimed with teh Find Replace is the way to go i think for this
    I rarely use any Office apps of any description, so every time I do...maybe once every few months, it is always a chore to remeber how to do things.
    Thanks agsin
    Neil

  • Anyway to have all your convos in one window using ichat?

    I have used Adium in the past, becaues it allows you to have all your chats in the same window (tabbed). Does ichat offer anything similar?

    Hi Steven,
    iChat does not do Tabbed Chat windows.
    http://www.apple.com/feedback/ichat.html
    Ralph

  • HT4796 how do i transfer all my content from one windows 7 laptop to another?

    i think ive transferred all the content correctly, but the music is asking to locate the file when i click on it.  how do i finish the migration so the titles are seeing the content?

    Are you trying to transfer to a Mac or a Windows computer? Migration Assistant will usually transfer your Windows user account. Look in System Preferences/Users & Groups to see if that happened. If so, the files are probably in there. Login as the Windows User and see if you can find them.
    If you can, drag the files/copy to the Mac Admin users Public box located at the Hard Drive Level/Users or to the Shared folder in the same location. You can then log in as the Mac user and put them in the correct place in your home folder.

Maybe you are looking for

  • Flash player crashes continuously in Firefox--tried everything

    For the past few days Firefox browser videos requiring Flash player do not open but give me the 'crash screen'. It works fine with Internet Explorer because it is built in. I have tried all of the recommended fixes from adobe and and firefox. I have

  • Tool tips in second level navegation

    Hi Experts,     I'm working with SAP Portal 6.0 and I need to implemet the next functionality:  It is possible to include a tool tip in the second level of top navegation menu? Any help would be appreciate. Thanks, Sergio Sepúlveda M.

  • I need app to help me to filter & hide columns in excel sheet?

    Is there any app helps me to filter & hide excel sheet ?

  • Having problem with FireWire !!!

    Please help me to setup Oracle RAC env. I am having really tough time to accessing Firewire card. "fdisk -l" always not showing the /dev/sda I used the following firewire cards 1 Belkin FireWire 3-Port 1394 PCI Card(From Circuit city) 2 SIIG, Inc. 3-

  • SALE DELIVERY BY FIFO METHOD FOR WITHOUT BATCH ITEM

    Suppose Customer u2018C01u2019 give me sale order first,of Item 'I01' after that my second customer u2018C02u2019 give me sale order of same Item 'I01' that time my employee give material to second customer ie 'C02' first,but i want  block the this p