views:

163

answers:

1

I am building a web app, for myself, to control some servers on my home network, and discovered what I think is very odd behavior in Firefox.

If you open a pop-up, via javascript, in Firefox, is it then impossible to open a new tab, via javascript in that pop-up? If not impossible, how do you do it?

Given a clean, default Firefox 3.6.3 installation...

If I open a page in Firefox and then call

var my_window = window.open('http://www.google.com','_blank','top=10');

A brand new "pop-up" window opens.

However, if instead I call

var my_window = window.open('http://www.google.com');

A get a new tab.

HOWEVER...

If I call the first version

var my_window = window.open('http://www.google.com','_blank','top=10');

And then in the new "pop-up" that opens, I call

var my_window = window.open('http://www.google.com');

It opens a new tab in the original window, not a new tab in the pop-up.

This seems very odd, and not intuitive at all. Why would the call in the pop-up open a tab in the "parent" window?

A: 

This behavoir is a browser setting, the user desides if he opens a new window or a new tab when he opens a link. You cannot manipulate this.

Only thing you can manipulate is if you open the link in a "blank" screen, current window or certain frame

Ivo
I can manipulate this. As I said, if I use:window.open('http://www.google.com','_blank','top=10');I can make a NEW WINDOW open.If instead I use:window.open('http://www.google.com');I can make a NEW TAB open.That isn't my issue. Read the rest of the question if you are interested in actually trying to answer it.
seth
I really think its browser setting related :)
Ivo