PC Review


Reply
Thread Tools Rate Thread

automatically changing pictures on my web page - "slideshow"

 
 
=?Utf-8?B?QWNhZGVtaWNQQw==?=
Guest
Posts: n/a
 
      3rd Nov 2004
My web page has a photograph central to the page. I would like to be able to
select several pictures, maybe 3 or 4, and have a different one show up
randomly every time someone opens the page, or refreshes, or maybe change
every 15 seconds.
Anybody have an idea on how to do this?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIEJ1eWVucw==?=
Guest
Posts: n/a
 
      3rd Nov 2004
The following script displays one of three pictures at random.

<script>
pics = new Array("sample10.jpg",
"sample11.jpg",
"sample12.jpg");
curDate = new Date();
curTim = curDate.getTime();
picNum = curTim % pics.length;
document.write("<img src='imagse/" + pics[picNum] +
"' border='0'>");
</script>

If you want more or less than three pictures, jsut enlarge or contract the
array. You may also have to adjust the path, images/.

For an example of a script that changes the picture every 5 seconds, look
near the end of this article:

Banner Ad Manager Displays Incorrectly
http://www.interlacken.com/winnt/tip...ow.aspx?tip=26

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

"AcademicPC" wrote:

> My web page has a photograph central to the page. I would like to be able to
> select several pictures, maybe 3 or 4, and have a different one show up
> randomly every time someone opens the page, or refreshes, or maybe change
> every 15 seconds.
> Anybody have an idea on how to do this?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The pictures in "My Pictures Slideshow" screensaver 'crystallize'. =?Utf-8?B?ZGNkdXNlaw==?= Windows XP General 5 31st May 2005 02:26 PM
Is "My Pictures Slideshow" random. =?Utf-8?B?VGVsbW9yZQ==?= Windows XP New Users 2 15th Mar 2005 07:21 PM
"my pictures slideshow" issue delchrys Windows XP Help 1 19th Feb 2005 01:55 PM
re:"my pictures slideshow" issue delchrys Windows XP Help 0 18th Feb 2005 09:42 AM
Changing "Show Type" on the fly in SlideShow PPS files JackCasual Microsoft Powerpoint 2 28th Apr 2004 12:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 AM.