3

I am not a very experienced javascript programmer by any means, but I am trying to prototype something for design purposes and I need some help. Here are some questions I have about window.open() in chrome

  1. How do I get the page to open in a new window. Not just another chrome tab.
  2. Is it possible for me click a link in one window and have it open in some other window already open on my browser.
  3. If I can open it in another window it is possible to specify which tab. Whether it be a tab that's already open or opening a new tab.

Thanks

Peter Paiste
  • 29
  • 1
  • 5
  • For #1, [JavaScript open in a new window, not tab](http://stackoverflow.com/questions/726761/javascript-open-in-a-new-window-not-tab) – Jonathan Lonowski Jun 02 '15 at 20:01
  • 1. You can try, but you can't do it reliably, it's up to the users settings. 2 and 3. It's possible, if the window was opened by you. You can't access random tabs or windows that you didn't open in the same script. – adeneo Jun 02 '15 at 20:09
  • Is there anyway you could elaborate on 3? I'm just wondering where I would need to specify which tab and window to open in – Peter Paiste Jun 02 '15 at 20:16
  • @PeterPaiste You can specify the name of a known window/tab with the 2nd argument to reuse it. `open()` doesn't support any more refined options than that. – Jonathan Lonowski Jun 02 '15 at 20:18

1 Answers1

2

I would like to quote other answers from helpful posts that will go more in depth to what you need to know, all the answers here are in javascript:

  1. Open a URL in a new tab also Open URL in New Window with Javascript

  2. open url in new tab or reuse existing one whenever possible also I want to open a new tab instead of a popup window

  3. You cannot open new windows or new tabs that your Javascript does not already know about because its outside its scope.

I hope this helps, please feel free to comment if you need anything further!

Community
  • 1
  • 1
AGE
  • 3,752
  • 3
  • 38
  • 60