Power Toys HTML Slideshow Creator Captions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created an HTML slide show using the MS Power Toys HTML Slide Show
wizard. I would like to add captions/descriptions for each image in the
array.

In the script, I have created an array of captions, similar to the vImage[]
array called vCaptions[]. Also, i have added a cell in the table under the
main image cell. However, I do not know the syntax to insert the text from
the array into this new cell. I see a line in the script "slidemain.src =
vImage[iImage]", and that slidemain is the "id" for the image in the main
image cell. I am trying to do something like capmain.src = vCaption[iImage],
but I don't know how to insert his into the caption cell as a variable.

Could someone please help me with this, or at least let me know if I am way
off.

Thanks
matt
 
MATT said:
I have created an HTML slide show using the MS Power Toys HTML Slide
Show wizard. I would like to add captions/descriptions for each
image in the array.

In the script, I have created an array of captions, similar to the
vImage[] array called vCaptions[]. Also, i have added a cell in the
table under the main image cell. However, I do not know the syntax
to insert the text from the array into this new cell. I see a line
in the script "slidemain.src = vImage[iImage]", and that slidemain is
the "id" for the image in the main image cell. I am trying to do
something like capmain.src = vCaption[iImage], but I don't know how
to insert his into the caption cell as a variable.

Could someone please help me with this, or at least let me know if I
am way off.

Thanks
matt

Hmm!
No, not way off. I like the idea. It is a good addition to this facility.

I haven't looked at the code that is generated, but I'll give it a go.

Add this into the cell that you placed under the image to hold the caption
<span id="capmain"></span>

Then your script can say
document.getElementById("capmain").innerHTML = vCaption[iImage]

If that doesn't work, repost and I'll have another look in a hour or so - I
need to go out right now.

There may be a way to directly access the cell (by giving the cell an id,
rather than giving an id to a span inside the cell) but I can't recall at
the moment.
 
Back
Top