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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setTimeout problem

Status
Not open for further replies.

hablablow

Programmer
Sep 9, 2000
115
FR
Hello,
I am trying to open a delayed popup from a parent popup.
Say a page index loads. While body onload it opens a popup A.
After a delay i would like a popup B to show up.
The setTimeout i am using is mixed with another center window Js function, and this is my problem: i don't know how to proper insert the setTimeout in my center window script without having syntax script problems.
If anyone could give me a push on this below:

********** here is my center window script:*****************

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
var exwin=null;
function Warning (theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
if(window.screen)if(isCenter)if(isCenter==&quot;true&quot;){
var myLeft = (screen.width-myWidth)/2;
var myTop = (screen.height-myHeight)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
if(exwin!=null)exwin.close();
window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
//-->
</SCRIPT>

********************** In my body *********************

onLoad=&quot; javascript:Warning('warning.htm','warning','','200','200','true')............

*********************The delay function*******************

setTimeout('??????????????()',40000)

With the position script and the onload it works, but where should i put the delay ??
If anyone can help.
Thanks for your incomming messages.
Hablablow.
 
Hello and thanks for your answer
I will try to do it this way.
Then i will have to add the pop function in the onload ?
Like this:
onLoad=&quot; javascript:Warning('warning.htm','warning','','200','200','true') ; pop()....
Anyway i had no answer on this subject for 2 weeks so i left this possibility for later...
I will be glad to go on this problem later...
I will let u know.
Merry Christmas.
Hablablow (.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top