View Single Post
Old 06-13-2002, 04:16 AM   PM User | #7
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Perhaps a solution?

<script type="text/javascript">
window.onload = function() {
var newWin;
if (typeof window.popped == 'undefined' || !window.popped) {
newWin = window.open('yourpopupstuff');
newWin.popped = true;

window.location.replace('http://www.google.com');
// maybe history.back() would suffice
}
}
</script>

I basically check to see if you haven't assigned the popup window a boolean, popped. If undefined or doesn't evaluate to true, open the popup code you want, giving the new window the popped boolean. And then, to preserve the main window, replace the location with google's.
__________________
jasonkarldavis.com

Last edited by jkd; 06-13-2002 at 04:18 AM..
jkd is offline   Reply With Quote