Web Analytics Made Easy -
StatCounter Is This Possible in a Browser? [JavaScript / HTML] - CodingForum

Announcement

Collapse
No announcement yet.

Is This Possible in a Browser? [JavaScript / HTML]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is This Possible in a Browser? [JavaScript / HTML]

    I have Javascript code that opens ISBNs of books on Amazon using hyperlinks (feel free to try, for example: 0133098648). I would like the URL to open up on a new window with all links clicked in a new tab on that same window. It appears one can only open in a new tab of the current window, or a new window every time.

    Is what I am looking to do even possible? I've been reading that something like this is restricted by browsers for security reasons; Maybe there's a work around? I've been pulling my hair out trying to find a solution for this, if I could it would make my life much more easier.

    A picture to describe my question: Imgur: The most awesome images on the Internet
    Please use JSfiddle example: Edit fiddle - JSFiddle

  • #2
    Everyone gets to decide for themselves whether pages open in the same tab, a different tab or a different window. Web -pages can only suggest (and often be ignored). Also the suggestion part was created before tabs existed and since it has not been recommended to even suggest since 1997 the extra code to be able to suggest a new tab was never added as suggesting a new window was considered to be poor practice - which fortunately modern browsers allow you to turn off.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

    Comment

    Working...
    X