View Full Version : A Popup and Redirect on One Page

12-05-2006, 04:34 PM
Hey guys!

I am working on a page that will create a popup then send the parent page back to the previous page using the history.back function. I am using the history back function because our website uses session ids and there is no way to link to a specific page. The code below works in IE but not in FireFox and it takes a little longer then I would like.


<title>URL Redirect</title>
<meta http-equiv=refresh content=0;URL="javascript:history.back(-1);">

<script language="javascript">
function bustOut(){
var newWin = window.open("http://LocationOfPopupPage", "subWindow","height=500,width=700,resizable=yes,scrollbars=yes");
window.onLoad = bustOut;

<body onLoad="bustOut()">
<p align="center"><br>
<font face="verdana, arial, helvetica"><span style="font-size:8.5pt;font-family:verdana, arial, helvetica">
This The document is located on an internal site. The document will now be opened for you from the internal site</strong></span></font><p align="center"><font face="verdana, arial, helvetica"><p align="center"><font face="verdana, arial, helvetica"><span style="font-size:8.5pt;font-family:verdana, arial, helvetica"><strong>You will now be redirected back to the previous page</strong></span>

Philip M
12-05-2006, 05:03 PM
Sorry - pressed wrong button

Philip M
12-05-2006, 05:04 PM
window.onLoad =" bustOut()";

<body onLoad="bustOut()">

The second onload will overwrite the first.

12-05-2006, 05:45 PM
Is there a way to get the redirect to take place while the user is viewing the popwindow. Whats happening now is the page opens in a pop which is great then once the user closes the pop page it takes it about 3 to 4 seconds for the parent page to change

12-05-2006, 06:14 PM
I know I could something like this if I had access to the popup source files

<script language="Javascript" type="text/javascript">

<body onUnload="changeParent()">

since I dont have access to the source files that the page is calling I was hoping there was a way to start a process on the parent page so that while the user is viewing the popup window its changing the page so that when they closed the pop they were at the correct page already