the way of the link. - javascript usage

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • 1.4
    • Component/s: None

      popup windows are used within confluence.

      currently popups in confluence are achieved with:

      <a href="#" onclick="window.open('http...','..','..')">linked text</a>

      This is broken if:

      • I right click and select "open in new window" the new window is blank
      • I try to bookmark the link
      • If I'm half way the page and I left click, - it scrolls me back to the top. (javascript should return false; to stop this)

      There is a better way to do these links:

      <a
      href="http://google.com/"
      onclick="window.open(this.href, 'popupwindow',
      'width=400,height=300,scrollbars,resizable');
      return false;"
      >
      Click me any way you desire, now or later, bookmarked or not.
      I will not attempt to control you, nor punish you, for I am a
      simple hyperlink; eager to do your bidding, while remaining ever
      helpful. I anticipating desires, but never trample possibilities.
      This is the way of the Link.
      </a>

      Aaron Bodeman has a little rant here:
      http://www.youngpup.net/2003/popups

      cheers,

              Assignee:
              Unassigned
              Reporter:
              Jim Head
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: