CGI for Slide show

Viktoras Didziulis viktoras at ekoinf.net
Thu Oct 12 16:00:17 EDT 2006


Thanks Mark! That's why I wrote "it has to be adjusted" ;-) 
 
Best wishes 
Viktoras 
 
-------Original Message------- 
 
From: Mark Wieder 
Date: 10/12/06 21:02:41 
To: How to use Revolution 
Subject: Re: CGI for Slide show 
 
Viktoras- 
 
Thursday, October 12, 2006, 2:47:28 AM, you wrote: 
 
> 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. 
 
The reason it doesn't work on non-msie browsers is that it's 
badly-formed javascript. I really don't understand why people have a 
reluctance to declare variables. Here's the same thing working on any 
javascript-enabled browser. All I did was declare the variable. 
 
<script language=javascript> 
var i; 
function changeImage() 
{ 
if (i < 15) 
i++; 
else 
i = 1; 
thisIm.src='Assets/im'+i+'.jpg'; 
} 
</script> 
 
<img src="Assets/im15.jpg" 
name="thisIm" 
alt="click to change image" 
galleryimg="no" 
onclick=changeImage()> 
 
-- 
-Mark Wieder 
mwieder at ahsoftware.net 
 
_______________________________________________ 
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