CGI for Slide show

Sivakatirswami katir at hindu.org
Tue Oct 17 02:32:06 EDT 2006


Thanks everyone for the JAVA script alternative.

I went ahead and "knocked together" a slide show using
iFrame and Revolution CGI. Please see

http://www.himalayanacademy.com/runrev/revolution_web_delivery.shtml

My main headaches had to do with paths and lineoffset and the fact
that "the files" of a default folder so not necessarily in alpha order
by default... anyway... it works.

Regarding the Java script option and AJAX I would be
interested on comments on how what I've done is
"retro" vs "newer" technologies.

Excuse me if it pushed my "let's talk  web dev strategy" buttons
Mind you I'm not much trained, so I tend to think and discuss things in
very simplistic and sometimes naive (= lacking some key info)
terms...  but I suspect I'm not alone on this boat...and I think
it's useful to keep brainstorming this area on a regular basis...

going a bit OT here....

the problem with Java is

a) I don't know JAVA script and am not  likely to invest
much time in that learning curve in the near future. and the example
script does not encompass the caption insertion aspect, nor
does it encompass the  "future flexibility" issue-- a mandate
in my book: any strategy must be future moldable with
the least amount of pain, I just don't see this in JAVA. But
I may be missing some key JAVA content management
strategy...

b) So, I'm really nervous about embedding JAVA scripts in pages
when you have a web site(s) (as we do) with some 15,000 plus pages.
That's not a lot  relative to some sites, but it's also not trivial
for a staff of one to  maintain...how is this normally handled?
Do web master regularly put SSI's in the head to pull in their
Java scripts? (i.e. they only have to main tain one script)

c) using SSI's that insert includes that call Rev CGI's is working very
well for us now. I suppose one could set up includes that also
pull in JAVA scripts into the <HEAD> element too that would do the
same thing, but then if your tags are hard wired to the Java script
in the head.... well, I just see this as getting a bit like spaghetti.
"future flex" is lost... Also if Rev CGI's return standard HTML
chunks, then cross browser issues go down...

e.g. I use this on *every* page on our web site:

<div id="linkList">
<!--#exec cgi="/cgi-bin/local_nav_include.cgi" -->					
</div>

and it is invoked by every GET request... and a rev CGI calls  side bar
links
that are "customized" for the realm of pages (i.e. what directory they
are in)
...it's marvelous... I looked at all kinds of other solutions  for
this, but
nothing could beat this one.... (if anyone wants the CGI code... ask  me
off  list)
I can write up another case statement in the CGI and drop a little list of
<li>somelinks</li> in the includes folder an viola! 100's of pages updated.
It's just too easy...with only about 30-50 GET requests for .html  pages
a minute,
the  CPU hardly blinks at loading a new instance of Rev on each GET request.
A minute is an eon for a Dual Xeon chip....mean while our PHP wikis are
  molasses compared to Rev... just fyi...

but I digress...

I would be interested in comments on how this differs from AJAX
delivery... or why a Java alternative would be better.

http://www.himalayanacademy.com/runrev/revolution_web_delivery.shtml

Sivakatirswami



Viktoras Didziulis wrote:
> 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()> 
>  

-- 
Om shanti
(In  Peace)

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/





More information about the use-livecode mailing list