Slideshows in iRev

Jim Ault jimaultwins at
Tue Dec 22 09:58:44 EST 2009

> <meta HTTP-EQUIV="refresh" CONTENT="10">

could be modified to pass a control parameter with each refresh of the  
same page.
Use the form of the CONTENT parameter to include the same url of the  
page + one param

<meta HTTP-EQUIV="refresh" CONTENT="10; URL=slideShowParams.irev? 
pImageNum =nextImgNumber">

-1- assume this page is "
-2- the following irev code is added to the slideShowParams.irev  

#Jacque's lists of copyrighted images (7)
         get "vinca.jpg thistleFluff.jpg pinkHoneysuckle2.jpg"
         get IT && "milkweed2.jpg lamiumClose2.jpg cosmos2.jpg  
         put IT into imageList

put $_GET["pImageNum"] into pImageNum

#detect conditions and react
(((  my working IREV script will be in the next email )))

-3- while still in the head section of the page use this line:
<meta HTTP-EQUIV="refresh" CONTENT="10; URL=slideShowParams.irev? 
so that you are defining pImageNum as a number for the next slide
of course, you could use any number, not just incrementing

-4- caution to note the exact location of the quotation marks
This line will also work using single quotes. Browsers honor both.

<meta HTTP-EQUIV='refresh' CONTENT='10; URL=slideShowParams.irev? 

This example is using the same page URL 10 seconds from now to reload  
the page and pass a parameter that will choose the next slide in  
sequence.  If pImageNum is missing, empty, or not a number, we use 1.

This is yet another way to get a slide show sequence in order.

(((  my working IREV script will be in the next email )))
Working page for 10 second refresh is

Jim Ault
Las Vegas

On Dec 20, 2009, at 10:16 PM, J. Landman Gay wrote:

> Sarah (and Sivakatirswami) wrote:
>> I would be very interested to see your code for this slideshow  
>> please.
> Ok, but it's almost too easy to post. There's a folder called  
> "cgiphotos" of flower images in the same directory as the irev page.  
> Inside that folder is also a text file named "cgiphotos.txt", which  
> contains a list of all the available photos. Each line of the list  
> has a file name as item one and a description as item two, like this:
> daisies.jpg,Daisies
> columbine2.jpg,Columbine
> etc
> In the html where I want the slideshow image to display, I choose a  
> random image and stuff that into the img src tag:
> <?rev
> put any line of url ("file:cgiphotos/cgiphotos.txt") into tFlower
> ?>
> <img src="cgiphotos/<?rev put item 1 of tFlower ?>" width="320"  
> height="240" border="1" />
> And later at the bottom of the page where I want the description to  
> appear:
> <?rev put item 2 of tFlower" ?>	
> I just use the refresh directive in a header to reload the page  
> every ten seconds:
> <meta HTTP-EQUIV="refresh" CONTENT="10">
> Pretty easy. If you wanted the slide show to be in a strict order,  
> it would be harder. I think you'd need to either set up cookies, or  
> write the current line to disk and read that for each reload, then  
> update the counter in the text file with the next line number.
> Or if you didn't want to keep a text file, you could read the files  
> in the directory and get the list that way too.

More information about the Use-livecode mailing list