Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Timed Self-Closing Window Script ???

Status
Not open for further replies.

erikkk

Programmer
Jun 25, 2001
12
0
0
IT
Hi,
I have a script that opens a window that will close itself after a pre-set time. The popup is launched automatically when the launching page loads.
My problem is that my launching page USES FRAMES and it doesn't work with it.
Help me! Please

--The Script--

Launching page code:
<head>
<script>

var theURL = 'thePopupPage.html';
var width = 300;
var height = 400;

function popWindow() {
newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width='+width+',height='+height);
}
</script>
</head>
<body onload=&quot;popWindow()&quot;>

Popup code:
<script>
var howLong = 10000;
t = null;
function closeMe(){
t = setTimeout(&quot;self.close()&quot;,howLong);
}
</script>
<body onload=&quot;closeMe();self.focus()&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top