Board navigation question

Discussion in 'Compliments & Comments' started by coasterbear, Dec 9, 2007.

  1. coasterbear

    coasterbear Toy Prince

    Joined:
    Sep 12, 2007
    Messages:
    243
    Location:
    SF Bay Area
    Board navigation question
    Not sure if this is the right forum, but other board questions seem to be here, so...

    On Macs, in both Safari and Firefox, cmd-click opens a link in another tab or window, leaving the current tab or window unchanged. On this board, when you click on a forum or post link, it opens the link both in another tab or window, and in the current tab or window.

    This works correctly on other phpBB boards. Any idea what the problem is?
     
  2. liquidsky

    liquidsky Vintage

    Joined:
    Dec 17, 2005
    Messages:
    7,725
    Board navigation question
    I use Safari 3 (with Tiger), and when I click on a post link here, it loads into the same tab. It doesn't load into a new tab.

    If I command-click on a post link, it loads into a new tab.

    So I'm not seeing what you are experiencing.
     
  3. lgcolddrink

    lgcolddrink Addicted

    Joined:
    Apr 17, 2007
    Messages:
    962
    Location:
    Houston
    Board navigation question
    All mine open in the same window in Safari.
     
  4. coasterbear

    coasterbear Toy Prince

    Joined:
    Sep 12, 2007
    Messages:
    243
    Location:
    SF Bay Area
    Board navigation question
    Ok, I think I understand why this is happening...but not why it is set up this way.

    On this board, the links on the text are specified with

    href="viewtopic.php?t=..."

    But the table cell containing the link has the Javascript

    onclick="window.location.href='viewtopic.php?t=...'"

    What this does is set the current window to that URL, regardless of where the browser thinks it should be opened.

    If you cmd-click in the table cell but not in the text, it activates the onclick, and opens the link in the same window. If you have JavaScript disabled, you can't exercise the link by just clicking in the table cell. (Notice that right-click in the cell does not include "Open Link..." options in the window...there is not really a link there, just JavaScript.)

    If you cmd-click on the text, it activates the text's link and opens the link in another tab/window, and it also activates the onclick and opens the link in the same window.

    I guess there's some advantage to putting the onclick on the cell, since it means you can get to the topic by clicking in the cell and not just on the text, but it has this unfortunate side effect. There are other ways to do this though that don't have this problem.

    We now return you to your regularly scheduled alternative form of geekdom.
     

Share This Page