Click to See Complete Forum and Search --> : Loading webpages through an array


sriksr
01-20-2004, 06:50 PM
Stucked with a problem here.
I have a html page with 2 frames(frame concept is not a must here for soln).
On top frame I am creating array of urls.
I want to display the websites provided in array in bottom frame one by one.
Once first url loads completely, then it should display second one and so on till end of array.

Could you pls tell me how to do this either by putting timer or without timer.

Pittimann
01-21-2004, 03:05 AM
Hi!

In the attached zip, you will find a little frameset document (this is the one, you have to open to see, what happens), a Links.htm for the top frame containing the array and the variable for the timer and three pages to be displayed in the bottom frame.

No 1 is loaded by the frameset document. After the specified number of seconds it will call the function in the Links.htm, then No 2 is loaded; this one does the same as No 1. Thus, No 3 is loaded after the specified time and as this is the last file to be loaded in this little example, it doesn't do anything.

If your array contains more files, all your files (except the last one) should have a body onload and the little function like in No 1 and No 2.

Cheers - Pit

Btw - why you need that array in the top frame's file?? You could just set a timeout in every file to be diplayed in the bottom frame, which calls the next file...