A
Albretch
Hi,
client wants for a window with no toolbars to open (technical and
'esthetical' reasons) after the window, user clicks on, is being
closed.
I told them about security settings in browsers and no cross-browsers
solutions and all of that we know, but they have told me they have
seen that before and how then the annoying pop-up windows work? . . .
After reading and searching . . . I still don't see how to get it
right
This is what I have (see below) which is still prompts you with the
message:
"The Web page you are viewing is trying to close the window."
"Do you want to close the window?"
"[YES|NO]"
// Page1_WithBrowswerToolbars.jsp
// - - - - - - - - - - - - - - - - - Page1_With Browswer Toolbars
<html>
<head>
<title>Page1_WithBrowswerToolbars</title>
<script type="text/javascript" language="Javascript">
<!--
function newWindow(popWin){
// __
window.opener = self;
window.close();
// __
popWindow = window.open(popWin, 'popWin',
'width=700,height=600,resize=yes,toolbar=no,location=no,scrollbars=yes');
popWindow.focus();
}
-->
</script>
</head>
<body bgcolor="ffffff">
<center><h1>Page1 With Browser Toolbars</h1>
<br />
<br />
<a href="javascript:newWindow('./Page2_WithNoToolbars.jsp')">click
here to open window with no tool bars</a>
</center>
</body></html>
// Page2_WithNoToolbars.jsp
// - - - - - - - - - - - - - - - - - Page2 With No Toolbars
<html>
<head>
<title>Page2_WithNoToolbars</title>
<script type="text/javascript" language="Javascript">
<!--
function CloseParent(){
var hwnd = window.open('','Page1_WithBrowswerToolbars'); // notice,
no page included, only the title of the window you want to hijack
hwnd.close();
}
-->
</script>
</head>
<body onload="CloseParent()">
<center><h1>Page2_WithNoToolbars</h1></center>
</body></html>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
client wants for a window with no toolbars to open (technical and
'esthetical' reasons) after the window, user clicks on, is being
closed.
I told them about security settings in browsers and no cross-browsers
solutions and all of that we know, but they have told me they have
seen that before and how then the annoying pop-up windows work? . . .
After reading and searching . . . I still don't see how to get it
right
This is what I have (see below) which is still prompts you with the
message:
"The Web page you are viewing is trying to close the window."
"Do you want to close the window?"
"[YES|NO]"
// Page1_WithBrowswerToolbars.jsp
// - - - - - - - - - - - - - - - - - Page1_With Browswer Toolbars
<html>
<head>
<title>Page1_WithBrowswerToolbars</title>
<script type="text/javascript" language="Javascript">
<!--
function newWindow(popWin){
// __
window.opener = self;
window.close();
// __
popWindow = window.open(popWin, 'popWin',
'width=700,height=600,resize=yes,toolbar=no,location=no,scrollbars=yes');
popWindow.focus();
}
-->
</script>
</head>
<body bgcolor="ffffff">
<center><h1>Page1 With Browser Toolbars</h1>
<br />
<br />
<a href="javascript:newWindow('./Page2_WithNoToolbars.jsp')">click
here to open window with no tool bars</a>
</center>
</body></html>
// Page2_WithNoToolbars.jsp
// - - - - - - - - - - - - - - - - - Page2 With No Toolbars
<html>
<head>
<title>Page2_WithNoToolbars</title>
<script type="text/javascript" language="Javascript">
<!--
function CloseParent(){
var hwnd = window.open('','Page1_WithBrowswerToolbars'); // notice,
no page included, only the title of the window you want to hijack
hwnd.close();
}
-->
</script>
</head>
<body onload="CloseParent()">
<center><h1>Page2_WithNoToolbars</h1></center>
</body></html>
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -