CGI for Slide show
janschenkel at yahoo.com
Wed Oct 11 16:35:06 EDT 2006
--- Sivakatirswami <katir at hindu.org> wrote:
> 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
While I can't give you a cgi script, here's my idea on
how I'd tackle this: put a form in the resulting html
file, with a hidden field that contains the current
... the normal stuff that includes the image ...
<input name="currentImage" type="hidden" value="5">
<input name="action" type="submit" value="Previous">
<input name="action" type="submit" value="Next">
Your cgi will receive the 'currentImage' and 'action'
parameters and will be able to determine what to do
next. For more complete control, you could also add a
hidden input that has the slideshow images directory.
Hope this gets you started,
Quartam Reports for Revolution
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the use-livecode