Is there a way to click a link and open a number of pages in new tabs?

3 replies
  • WEB DESIGN
  • |
I'm just tossing around ideas for my home page and I think it would be cool if I could allow users to set and share bookmarks. In fire fox I have a folder full of bookmarks I click it and either click the link I want to open or click open all in new tabs.

Is there a way to get that effect within a web page? I think I can get the drop down effect to list the bookmarks but I have no idea how I can get the option to open all in new tabs.

I also haven't come up with a way to allow users to create their own but I'm sure I can figure it out once I start digging into a programing language.
#click #link #number #open #pages #tabs
  • Profile picture of the author lostarts
    To get a bookmark to open in a new tab it requires you to add an attribute to a link's code - such as:

    Code:
    <a href="exampleSite.com" target="_blank">Examplesite.com</a>
    Otherwise to code this into your site, you need to do a bit of javascript coding. This can become quite elaborate depending on what you need.

    I found reference code if you are interested in setting this up - check out this thread which shows you how to open multiple tabs in javascript:
    Multiple tabs in javascript on codingforums.com

    Feel free to PM me if you need help or have any other questions.
    Signature

    "We think in secret and it comes to pass. Environment is but a looking glass" - James Allen, As a Man Thinketh
    clear-mind-meditation-techniques.com
    Premium Landing Page Service
    Quick, Easy, Affordable Squeezepage

    {{ DiscussionBoard.errors[3084514].message }}
  • Profile picture of the author Ambius
    however, target=_blank will not force a new tab. The browser will decide if it opens in a new tab or a new window based upon the user's custom settings in his browser. I do not believe there is a way to _force_ a new "tab".
    {{ DiscussionBoard.errors[3084987].message }}
    • Profile picture of the author lostarts
      I agree with Ambius. While you cannot "force" a window to open in a tab, there are things you can do to make this the preference for your site; such as using the attribute in the link code.

      If a user has default settings, then the "_blank" attribute will allow a new window to open in a tab. Though it doesn't force anything - like you said.

      It's best not to override user preferences - especially if they changed the default settings in their browser.

      Personally I prefer opening new windows in tabs, so I simply use keystrokes to make sure this happens.
      Signature

      "We think in secret and it comes to pass. Environment is but a looking glass" - James Allen, As a Man Thinketh
      clear-mind-meditation-techniques.com
      Premium Landing Page Service
      Quick, Easy, Affordable Squeezepage

      {{ DiscussionBoard.errors[3088464].message }}

Trending Topics