Results 1 to 4 of 4

Thread: Open link in new tab

  1. #1
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Open link in new tab

    I'm searching for code that'll open a link in a new tab, just as you can open one in a new window.
    The code would have to be able to detect browser version and open in a new window if it doesn't support tabbed browsing.

    Thanks in advance.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Can you do that? Seems to me that you would need to basically rewrite an over ride for use settings. In FF atleast (as I haven't tried IE7 yet) opening links in a new tab or a new window is a user choice, not a web masters.

    Theoretically then, if I want all links to open in a new window they will do so, despite what code you have on the link itself.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,626
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Yes IE 7 also support a provision for opening new window(s) using new tabs. I don't think it is possible for the developer to override the settings of user browsers.

    Another example is even if you don't display address bar IE 7 will add its own address bar overriding the script that generate the popup window irrespective of its settings..

  4. #4
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Just for kicks and giggles, thought I would make up what I believe to be a random code for opening links in new tabs. Using HTML codes do the following.

    <a href="pickasitename.net" target="_tab">Pick a Site Name</a>

    Tried it in Firefox and it opened link in new tab (as long as tabbed browsing is turned on). Tried it in IE7 as well to no avail, just opened it in a new window.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •