3 Replies Latest reply on Jun 14, 2006 11:22 AM by Newsgroup_User

    "Open in new tab" menu when a link is right-clicked?

    zakoops
      Is there any way in Flex 2 to make a link shows a contextual menu (when it's right-clicked) that shows "Open in new tab" à la Firefox (and probably in IE7)?

      I think such function is vital for the success of Flex 2.

      Any one out there who knows how to do it?
        • 1. Re: "Open in new tab" menu when a link is right-clicked?
          prdv
          You could try flash.ui.ContextMenu, that is, if you know how to open a link in a new tab using javascript, you could hook that code to your custom "Open in new tab" option in the flash context menu.

          (Disclaimer: I don't know if it is possible to open the link in a tab)
          • 2. Re: "Open in new tab" menu when a link is right-clicked?
            zakoops Level 1
            To insure success for the Flex 2 platform (i.e. to reduce ranting levels about Flash on Slashdot forums and to calm gurus of xhtml and css), Adobe must get into the act in providing a mechanism that makes such a link obviously simple.

            I mean, we should not use any kludge or use any esoteric programming to activate such behavior. Something as simple as « Open in new tab » check box in the properties windows for an html link.

            Thanks nevertheless for the information!


            • 3. Re: "Open in new tab" menu when a link is right-clicked?
              Level 7
              Unfortunately, I don't think Mozilla/Firefox provides any way to let us do
              this programmatically; the only way for it to happen is for a user to do it
              himself, e.g. by ctrl-clicking a regular HTML <A> link. (I haven't checked on
              whether IE 7 provides a way.) If you look at
              http://developer.mozilla.org/en/docs/DOM:window.open , there is this Q&A:

              -- begin quote --

              Q: How do I open a referenced resource of a link in a new tab? or in a
              specific tab?

              A: Currently, you can not. Only the user can set his advanced preferences to
              do that. K-meleon 0.9, a Mozilla-based browser, gives complete control and
              power to the user regarding how links are opened. Some advanced extensions
              also give Mozilla and Firefox a lot of power over how referenced resources are
              loaded.

              In a few years, the target property of the CSS3 hyperlink module may be
              implemented (if CSS3 Hyperlink module as it is right now is approved). And
              even if and when this happens, you can expect developers of browsers with
              tab-browsing to give the user entire veto power and full control over how
              links can open web pages. How to open a link should always be entirely under
              the control of the user.

              -- end quote --


              --
              Mike Morearty
              Developer, Flex Builder team
              http://www.morearty.com/blog