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!

Loading a page after a minute or so!

Status
Not open for further replies.

Nunners

Programmer
Aug 22, 2001
25
0
0
GB
Hi,

I am having trouble trying to delay the opening of my web pages. In the below code, i open two other web pages off the back of the main page.

<HTML>
<HEAD>
<TITLE>Sales Analyser</TITLE>
</HEAD>

<BODY>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
window.location=&quot;
window.open('
window.open('
</SCRIPT>

</BODY>

</HTML>


My Javascript is a bit limited, so i think i need a spot of help.

I would like the two &quot;open.window&quot; functions to run approx: 1 minute after the main page has been opened.

I know this can be done with the setTimeout function, but i am stumped as to how the actual notation should go around the &quot;window.open&quot; calls.

Any help would be greatly received......Nunners
 
hie
try smth like this:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function loadNext(){
window.location=&quot;
window.open('
window.open('}

onload=function(){
setTimeout(&quot;loadNext()&quot;,60000)
}
</SCRIPT>

Victor
 
well, since you are changing the page location this needs to go on the new page:
Code:
<script language=&quot;javascript&quot;>
setTimeout(&quot;window.open('[URL unfurl="true"]http://rs2020-1-3:777/servlet/page?_pageid=141&_dad=portal30&_schema=PORTAL30','top_bottem','width=1010,height=325,resizable=YES,left=0,top=385')&quot;,[/URL] 60000);

setTimeout(&quot;window.open('[URL unfurl="true"]http://rs2020-1-3:778/pls/portal30/PORTAL_LIVE.DYNAMIC_PRODUCT_NOTE_PAGE.show','post_it','width=200,height=75,left=815,top=0')&quot;,[/URL] 60001);
</script>

also you spelled bottom wrong in the name of the first popup... -Greg :-Q
 
Cheers people, i wasn't expecting a responce so quick!

P.S. it works great now cheers.

Nunners
 
Why not just go with vituz code, but move document.location till after the two pages has &quot;popedup&quot;?!

Going down...
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
because you will lose the timeout when you load a new page -Greg :-Q
 
yeah, Greg is right..
sorry guyz, it is 9-30 pm here & i wanna go home..

c ya Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top