CGI for Slide show

Viktoras Didziulis viktoras at ekoinf.net
Thu Oct 12 05:47:28 EDT 2006


 There is an alternative with javascript using properties of image tag. It
can (re)load images without reloading the whole page, so it also saves some
bandwith for you. Here is the recipe provided all images are in same format
(let'say jpg) and with names made using a phrase and a number - e.g. im1.jpg
 im2.jpg, im3.jpg, etc...
 
This is how your image tag might look like for a slideshow of 15 images:
img src="im1.jpg"
name="thisIm"
alt="Click to change image"
galleryimg="no"
onclick="if (i<=15) {i++}; else {i=1}; thisIm.src='im'+i+'.jpg';"
 
The script still has to be adjusted for Non MSIE browsers, current version
works on MSIE.
 
Viktoras
 
-------Original Message------- 
 
From: Sivakatirswami 
Date: 10/11/06 22:24:35 
To: How to use Revolution 
Subject: CGI for Slide show 
 
Has anyone done a CGI that runs a slide show? 
 
basically you have a folder of images, user clicks "Next" or "Previous" 
and the CGI drives a new image and text into the same screen. 
 
If this could be an embedded object, great, otherwise, a complete web 
screen built from a template or something... the only caveat is 
of course, Rev has no session variables... so how do we store the users' 
current place in the slide show? If user ONE is flipping through the 
slide show and is on slide 5 and user TWO is flipping through the slide 
show and is on slide 8, where does that information live? I suppose 
one could generate a hidden input variable on the fly, embed this in 
the page as a input if we want to use POST or as a GET parameter 
in the cgi "next" button which is passed to the CGI in $QUERY or 
possibly we save cookie info? 
 
I recall some mentioned a few years back about someone successfully 
embedding stuff in a web page with CGI; I can also use iFrame which is 
considered non-standard, and deprecated 
(I don't know why... it works fine...I use it now.) 
Or push the show to a new top window which contains the entire 
presentation and no other elements. 
 
I see lots of ways of doing this pretty easily, but 
before digging into it I just wanted to check before re-inventing the 
wheel. 
 
TIA 
 
Sivakatirswami 
www.himalayanacademy.com 
 
Get Hinduism Today Digital Edition. It's Free! 
http://www.hinduismtoday.com/digital/ 
 
_______________________________________________ 
use-revolution mailing list 
use-revolution at lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences: 
http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the Use-livecode mailing list