3

Bear with me as this might seem similar to ( JavaScript open in a new window, not tab), but the method by which the link is executed is different. I am opening a "Sales Script" application via a third party application when a soft phone is answered. If the sales rep already has a browser window open (and they always do), a new tab is opened within the existing window and it isn't always readily noticeable. They are requesting that I always have my application pop a new window, but as near as I can tell the only way to do this is via the browser's preferences. Is there by any chance some javascript I am not aware of that will "undock" a tab? I suspect the answer is no, but had to ask.

Thanks for your time!

[EDIT] I thought maybe this was out of scope of the question initially, but I think it could shed light on what I am trying to do: A 3rd party app (iSymphony) runs on the local machine and listens to events on our call controller. When the rep answers, it fires a URL, which is opened in the system's default browser. I don't really have any control over how it's opened, which is why I was hoping for a javascript solution to ensure I was in a new window.

Community
  • 1
  • 1
Jesse Q
  • 1,451
  • 2
  • 13
  • 18
  • You're saying the sales person clicks on a link in a third party app, and that link is opened in a new tab in their existing browser? Yea, that's an IE setting (Called like Use Existing Browser for links or something).. – Mike Christensen Nov 29 '12 at 23:23

1 Answers1

12

If you specify the width and height when you call window.open, most browsers will open the link in a new window rather than a tab.

window.open(url, '_blank', 'width=300,height=200');

Fiddle: http://jsfiddle.net/kelervin/Pf8Rw/

See this question for discussion and more detail.

If the intent is to get the user's attention, you could consider adding desktop notifications (assuming a browser like Chrome that supports them is an option).

See this answer for an example, it might be just what you're looking for.

Community
  • 1
  • 1
Kelvin
  • 5,227
  • 1
  • 23
  • 36
  • 1
    I think he's looking for a way to make an existing window *break out* of being in a tab. He can't control how the window was launched in the first place, as it was done so by a third party app. – Mike Christensen Nov 29 '12 at 23:30
  • Thanks Mike - I realised that and almost deleted my answer when I saw your comment on the question, but thought I'd update my answer with a suggestion for working around the problem instead :) – Kelvin Nov 29 '12 at 23:32
  • 1
    Thanks for the Chrome suggestion, I definitely hadn't thought of that. I think I am going to have the 3rd party app call a pre-page that uses your window.open suggestion to call mine. It's clunky, but it should get me by. Was hoping for something more elegant, but sometimes you just have to get the job done. :) – Jesse Q Nov 30 '12 at 03:59
  • If you want a maximized window, look at this: http://stackoverflow.com/questions/10297168/how-to-open-maximized-window-with-javascript – fstang Mar 08 '16 at 18:40
  • If you add ",toolbar=yes" to the parameters, then it opens in a new tab instead of new window (in Chrome 59.0.3071.115). A couple of us just discovered this - must be a recent change to Chrome. – Michael K Jul 18 '17 at 20:59