J
john_woo
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
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