PDA

View Full Version : Popup time delay


Wobbler
10-13-2002, 12:13 AM
Ok when the first page loads I want the popup to wait 3 seconds until launch and 2 seconds after it launch it the loader page will change to a "welcome back" page. I've managed to script this pretty good. But I've got one problem when you enter the site the popup lauches directly and after 2 sec. it opens one more popup and after 5 sec it changes site. How do I solve the problem with the popup that opens directly!!?? plz help!

Here is the code I've got so far:

<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT="5; URL=welcomeback.htm">
<title>4 Elements Studios</title>

<script>
function openpopup(){
var popurl="index2.htm"
winpops=window.open(popurl,"","width=750,height=550,")
}

openpopup()

</script>
</head>

<body onload=setTimeout("openpopup()",3000) text="#B3B285" alink="#FFFFFF" vlink="#FFFFFF" link="#FFFFFF" bgcolor="#000000">

<center>
<table height="100%" width="100%" border="0">
<tr>
<td height="80%" align="center"><img src="all/global/wappen_gross.gif" border="0" width="364" height="200"></td>
</tr>
</table>

</center>

</body>
</html>

Wobbler
10-13-2002, 12:22 AM
Ok I managed to fix the popupscript but I need help with centering the new window on the screen!!

My code

<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT="5; URL=welcomeback.htm">
<title>4 Elements Studios</title>

<script language="JavaScript">
<!--
function open_window()
{
setTimeout("timeoutPart()",3000);
}
function timeoutPart()
{
thisWindow = window.open('main/index.htm',"website","width=750,height=550,scrollbars=no,resizable=no,toolbar=no,status=no,directories=no,menubar=no,locat ion=no");
thisWindow.moveTo(50,50);
thisWindow.focus();
}
//-->

</script>

</head>

<body onLoad="javascript:open_window()" text="#B3B285" alink="#FFFFFF" vlink="#FFFFFF" link="#FFFFFF" bgcolor="#000000">

<center>
<table height="100%" width="100%" border="0">
<tr>
<td height="80%" align="center"><img src="all/global/wappen_gross.gif" border="0" width="364" height="200"></td>
</tr>
</table>

</center>

</body>
</html>

chrismiceli
10-13-2002, 05:37 AM
his original code will work w/ a few modifications


<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT="5; URL=welcomeback.htm">
<title>4 Elements Studios</title>

<script>
function openpopup(){
winpops=window.open("index2.html","","width=750,height=550,") //why not just us the direct name instead of using a variable for index2.html
}

//don't need openpopup()

</script>
</head>

<body onload="setTimeout('openpopup()',3000)" text="#B3B285" alink="#FFFFFF" vlink="#FFFFFF" link="#FFFFFF" bgcolor="#000000">

<center>
<table height="100%" width="100%" border="0">
<tr>
<td height="80%" align="center"><img src="all/global/wappen_gross.gif" border="0" width="364" height="200"></td>
</tr>
</table>

</center>

</body>
</html>