I want to open a popup using JavaScript that comes to the front of the
screen using Window.open(...)
It comes to the front using internet Explorer but not Firefox. I know
pop-ups are annoying but in this case the user has configured they
want pop-ups from the portal.
So, can anyone tell me if it is possible to get a pop-up to open in
the foreground as opposed to the background on Firefox.
Thanks,
EM
> I want to open a popup using JavaScript that comes to the front of the
> screen using Window.open(...)
>
> It comes to the front using internet Explorer but not Firefox.
Or any other browser that has tabbed browsing enabled by default.
> I know pop-ups are annoying but in this case the user has configured
> they want pop-ups from the portal.
>
> So, can anyone tell me if it is possible to get a pop-up to open in
> the foreground as opposed to the background on Firefox.
Popups are not opened "to the background". Google is your friend. [psf 6.1]
PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300...@news.demon.co.uk> (2004)
in a window or a tab ?
> So, can anyone tell me if it is possible to get a pop-up to open in
> the foreground as opposed to the background on Firefox.
Usually the 1st time you open a popup it comes in front, even with
another browser than IE.
If you recall same popup witch has not been closed and has been sent in
rear (background), the popup will not come in front, it'll stay behind
(under ?) the main/mother window.
To be sure the popup will be shonw over the main window :
function pop(url) {
if(typeof myPop == 'undefined' || myPop.closed())
myPop = window.open('','myPop','width=300,heiht=300');
myPop.location = url;
myPop.focus(); // go in front ! !
}
If the popup opens in a tab that would have to display this tab.
--
sm
I have my browsers configured to open the new window in a new window
not in a tab, hence popup.
myPop.focus() works for Internet Explorer but not for Firefox.
e.g. If firefox is running but I am currently in another application
like an email client then the popup does not come to the front, but if
I Had IE running instead then focus() works and the popup comes to the
front.
EM
Of course it does.
> e.g. If firefox is running but I am currently in another application
> like an email client then the popup does not come to the front, but if
> I Had IE running instead then focus() works and the popup comes to the
> front.
Normal ... parts of IE are used by the system, so it's almost as if it
would be the system that called the popup.
If you like to be disturbed when you are on another application than the
browser use IE or make your popup to be displayed in a corner screen and
don't open in full screen your other application leaving visible a bit
of that popup (make it flashing on calling to get your attention).
myPop.focus();
flash = setInterval(function(){var b = myPop.document.body.style;
b.background = b.background==''? 'yellow':'';},300);
setTimeout(function(){clearInterval(flash)},2000);
}
--
sm