Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q334 How can I cycle through several HTML files with a timeout set between each page?

irt.org | Knowledge Base | JavaScript | Timeout | Q334 [ previous next ]

Q334 How can I cycle through several HTML files with a timeout set between each page?

You'll need to use a frameset which reloads one of the frames with another document:

<SCRIPT LANGUAGE="JavaScript"><!--
function loadOne() {
    window.frames[0].location.href = 'apage.html';
    setTimeout("loadTwo()",5000);
}

function loadTwo() {
    window.frames[0].location.href = 'bpage.html';
    setTimeout("loadThree()",5000);
}

function loadThree() {
    window.frames[0].location.href = 'cpage.html';
}

setTimeout("loadOne()",5000);
//--></SCRIPT>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.