From: john_woo on
Hi,

I want to make a pop up windows always on top, the following code
works well in firefox (tested in 3.5 and 3.6), but for IE (tested in
IE 8 and IE 7), it doesn't:

<html>
<head>
<script language="javascript" type="text/javascript">
function openN() {
popwin = window.open('http://
www.google.com','newWindow','height=500,width=700');
popwin.focus();
window.onfocus = function () {
if (popwin != null) {
popwin.focus();
}
}
}
</script>
</head>
<body>
<input type="button" value="open" onclick="openN();"/>
<p>
<input type="button" value="disable by pop up" onclick="alert
('enable');"/>
</body>
</html>

FYI: I've tried using document.onfocusin (for IE) still got same
result.

Can any one explain/fix something?

Thanks
--
John
From: Scott Sauyet on
On Jan 28, 4:05 pm, john_woo <john_...(a)canada.com> wrote:
> I want to make a pop up windows always on top, the following code
> works well in firefox (tested in 3.5 and 3.6), but for IE (tested in
> IE 8 and IE 7), it doesn't: [ ... ]
>     popwin = window.open('http://www.google.com','newWindow','height=500,width=700');

I know that FF implemented IE's showModalWindow, but I don't know if
others have:

popwin = window.showModalDialog('http://www.google.com',
{}, 'dialogheight:500; dialogwidth:700');

Good luck,

-- Scott
From: john_woo on
On Jan 28, 4:51 pm, Scott Sauyet <scott.sau...(a)gmail.com> wrote:
> On Jan 28, 4:05 pm, john_woo <john_...(a)canada.com> wrote:
>
> > I want to make a pop up windows always on top, the following code
> > works well in firefox (tested in 3.5 and 3.6), but for IE (tested in
> > IE 8 and IE 7), it doesn't: [ ... ]
> >     popwin = window.open('http://www.google.com','newWindow','height=500,width=700');
>
> I know that FF implemented IE's showModalWindow, but I don't know if
> others have:
>
>     popwin = window.showModalDialog('http://www.google.com',
>                 {}, 'dialogheight:500; dialogwidth:700');
>
> Good luck,
>
>   -- Scott

Thank you, Scoot.

BTW, how could I know what functions (ex: window.showModalDialog)
implemented in IE only?

--
John
From: Scott Sauyet on
On Jan 28, 5:02 pm, john_woo <john_...(a)canada.com> wrote:
> BTW, how could I know what functions (ex: window.showModalDialog)
> implemented in IE only?

I'm not really sure what the best references are. Google should
help. Peter Paul Koch has long maintained some references to browser
compatibilities at

http://www.quirksmode.org/

The Mozilla reference is at

https://developer.mozilla.org/en/Gecko_DOM_Reference

and the MSIE one is at

http://msdn.microsoft.com/en-us/library/ms533053%28VS.85%29.aspx

Cheers,

-- Scott
From: RobG on
On Jan 29, 7:05 am, john_woo <john_...(a)canada.com> wrote:
> Hi,
>
> I want to make a pop up windows always on top, the following code
> works well in firefox (tested in 3.5 and 3.6), but for IE (tested in
> IE 8 and IE 7), it doesn't:
[...]
> Can any one explain/fix something?

Don't attempt it. It is a very annoying UI feature so browsers like
Firefox allow users to set preferences to stop script raising,
lowering, moving or resizing windows.


--
Rob