I have a Browser which I call with the window.open function to pop setting
toolbar=no,scrollbars=yes,location=no
What I would want to accomplish which has turned into a difficult task is when
th user closes/exits the pop-up browser, I need to redirect the main browser in
the backround to open another page.
e.g User opens Page #1.
User clicks on Link in Page #1 and popups up Page #2 (Page #1 stays in
backgroud)
User Closes Page #2 and wants Page #1 to redirect or open another page#3 with
all the browser functions(no popup)
Any one has eaxmples of this.
Kevin Schmidt - 29 Nov 2006 16:01 GMT
You can do it with Javascript.
try using
<input type="button" value="Close Window" onClick="parent.location.href='yoururl';window.close();">
I think that should do the trick.
Dan Bracuk - 29 Nov 2006 16:49 GMT
Actually, you would have to use the onclose event to run that code, since there is more than one way to close a pop-up.
AppDeveloper - 30 Nov 2006 01:19 GMT
Here you go:
[b]Page #1:[/b]
<html>
<head>
<title>Page #1 (Parent Window)</title>
<script language="JavaScript">toolbar=no,scrollbars=yes,location=no
function openWindow() {
var newWin = window.open("PageTwo.cfm", "NewWindow",
"toolbar=no,scrollbars=yes,location=no");
}
</script>
</head>
<body>
Page #1 (Parent Window)
<form>
<input type="button" value="Open New Window" onclick="openWindow()">
</form>
</body>
</html>
[b]Page #2:[/b]
<html>
<head>
<title>Page #2 (New Window)</title>
</head>
<body onUnload="opener.location.href='http://www.yahoo.com';">
Page #2 (New Window)
</body>
</html>