[thelist] Slide show with html tex
Diane Soini
dianesoini at earthlink.net
Tue Oct 14 21:13:15 CDT 2003
The problem is that it is easy to script an image tag to change its src
on a timer, but more difficult to change the text. You can do it a
number of ways. One is to use the innerHTML property of a div tag or p
tag. Just give it an id, like <div id="caption"></div> then use
document.getElementById('caption').innerHTML = "my new caption text";
You'll have to rewrite the script a little so that it not only switches
the image, but it also switches the text, and you should put your
captions in an array, each caption matching the same index as the
corresponding image.
This technique will work ok for newer browsers, but if you want it to
work for Netscape 4 then you'll have to work a little harder and maybe
use layers and some browser detection. I'm not a real expert on layers
and Netscape 4. I've decided to forget worrying about NS4 anymore. But
from what I understand, you can use a div tag as a layer, and
layers['divname'].document.write('caption content') or something like
that. Or maybe you have to make a bunch of hidden layers and set the
next caption layer to visible and hide the previous one. If you have a
little javascript knowledge and access to some helpful web sites or a
good book, you can probably figure something out.
Diane
On Tuesday, October 14, 2003, at 02:55 PM,
thelist-request at lists.evolt.org wrote:
>
> That is along the line of what I am looking for. You can do it with
> images
> - JPG, GIF etc, but I am not sure how to do it to regular html text
> that is
> in a sell below the cell that the image is in. I think I posted this
> earlier, but here's What I did previously:
More information about the thelist
mailing list