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

Continuous slide show

Status
Not open for further replies.

gcole

Programmer
Aug 2, 2000
390
US
I want to run a slide show when my page loads. I also would like it to repeat when it is finished. Any ideas?
 
The absolute easiest way to simulate a slide show is by using a redirect script and linking pages the pages together with the last page linking to the first one. If you want the slide show to be on only a portion of the screen, use it in a frame.

The redirect script will change the current page to the next page (you see these all the time on the web when you get to a page that has moved. Often they tell you to wait 5 seconds or click if you are not taken automatically).

Put this script in the head portion of your page:

<script language=&quot;JavaScript&quot;>
<!--
// pause_time determines the length of pause after the page
// is loaded until it transfers
// 0 = 0 seconds
// 5000 = 5 seconds
// 10000 = 10 seconds
pause_time = 2000;

// transfer_location is either the relative or full URL
// of the page to which you want it to transfer you
transfer_location = &quot;slide5.htm&quot;;

function transfer() {
if (document.images)
setTimeout('location.replace(&quot;'+transfer_location+'&quot;);',pause_time);
else
setTimeout('location.href = transfer_location;',pause_time);
}
// -->
</script>

Be sure to change the page you want it to go to (here is will redirect to slide5.htm) and change the pause_time (which is set here for 2 seconds). The pause time is the amount of time the page will show after the graphics have loaded.

If the script gets trashed by the message board filters you can email me for it
bunni@bunni.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top