ellenjones6
07-04-2012, 05:07 PM
I have been using a Javascript from Codelifter.com to create slideshows (with captions) for my website: www.adirondackvic.org . However, none of the images in my slideshows are being indexed by Google, because they don't have Alt or Title attributes. Is there a way I can include Alt and Title attributes so that Google recognizes them and indexes the images? Here is a sample page with a slideshow I have modified (following instructions I found in a 2006 thread): http://www.adirondackvic.org/Adirondack-Birding-Center-Bird-Walk-30-June-2012.htm . The slideshow works but the Alt text for each image is not showing up in IE. (I see the Alt text for the initial image only.) Can anyone help me? What am I doing wrong?
Here is the code:
<script>
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.
// ==============================
// Set the following variables...
// ==============================
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;
var Picture = new Array(), Alt = new Array(); Title = new Array()// don't change this
var Caption = new Array(); // don't change this
var showHot = false; // don't change this
// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!
Picture[1] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-1.jpg';
Picture[2] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-2.jpg';
Picture[3] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-3.jpg';
Picture[4] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-4.jpg';
Picture[5] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-5.jpg';
Picture[6] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-6.jpg';
Alt[1] = "Barnum Brook from the Jenkins Mountain Trail";
Alt[2] = "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building";
Alt[3] = "New trail surfacing on the Hemlock Connector";
Alt[4] = "Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail";
Alt[5] = "Saint Regis Mountain from the trail in front of the VIC building";
Alt[6] = "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail";
Title[1] = "Barnum Brook from the Jenkins Mountain Trail";
Title[2] = "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building";
Title[3] = "New trail surfacing on the Hemlock Connector";
Title[4] = "Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail";
Title[5] = "Saint Regis Mountain from the trail in front of the VIC building";
Title[6] = "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail";
// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!
Caption[1] = "Barnum Brook from the Jenkins Mountain Trail";
Caption[2] = "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building";
Caption[3] = "New trail surfacing on the Hemlock Connector";
Caption[4] = "Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail";
Caption[5] = "Saint Regis Mountain from the trail in front of the VIC building";
Caption[6] = "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail";
// =====================================
// Do not edit anything below this line!
// =====================================
var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function control(how){
if (showHot){
if (how=="H") jss = 10;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
</script>
<!--
The next table cell holds the images.
Set cell and image width and height the same.
The img src must have name=PictureBox in its
tag. Often, the first image in the Picture
array in the script is used here; but you
may also use a different, introductory image
as we have here, since this image is shown
only on start-up.
//-->
<td width=468 colspan="3">
<div align="center">
<h1><font face="Arial, Helvetica, sans-serif" size="2"><br>
<b>Birding the Adirondacks:<br>
Teddy Roosevelt Bird Walk<br>
30 June 2012</b><br>
<br>
<img src=Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-3.jpg name=PictureBox width=468 height=357 border="1" alt="Birding the Adirondacks | Teddy Roosevelt Bird Walk (30 June 2012)">
</font></h1>
</div>
<font face="Arial, Helvetica, sans-serif" size="2"><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript></font><font size="2"><noscript>
</noscript><noscript> </noscript></font><noscript>
<center>
<font color="red" face="Arial, Helvetica, sans-serif" size="2"><a name="1"></a>You
have JavaScript turned off on your browser. To view the
entire slide show, please enable JavaScript.</font>
</center>
</noscript> </td>
</tr>
<!--
The following three cells contain the controls.
Each of the control a href's must contain class=
Controls, to attach the styles (see top of script).
To dress this up a bit, you can of course substitute
<img src> images for the text in the links.
//-->
<tr>
<td width=33% align="center"> <font face="Arial, Helvetica, sans-serif" size="2"><a class=Controls href="#1" onClick="javascript:control('B');">Previous
Slide</a></font></td>
<td width=33% align="center"> <font face="Arial, Helvetica, sans-serif" size="2"><a class=Controls href="#1" onClick="javascript:control('H');">First
Slide</a> </font></td>
<td width=33% align="center"> <font face="Arial, Helvetica, sans-serif" size="2">
<a class=Controls href="#1" onClick="javascript:control('F');">Next
Slide</a> </font></td>
</tr>
<tr>
<!--
The next table cell holds the captions.
This table cell must have id=CaptionBox and
class=Caption in its tag. The default caption
shows whilst loading in all browsers; NS4
will show only the default caption, throughout.
//-->
<td id=CaptionBox class=Caption align=center colspan="3"><font face="Arial, Helvetica, sans-serif" size="2"><br>
<b>TR Bird Walk Slide Show</b></font></td>
</tr>
</table>
</center>
Here is the code:
<script>
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.
// ==============================
// Set the following variables...
// ==============================
// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;
var Picture = new Array(), Alt = new Array(); Title = new Array()// don't change this
var Caption = new Array(); // don't change this
var showHot = false; // don't change this
// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!
Picture[1] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-1.jpg';
Picture[2] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-2.jpg';
Picture[3] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-3.jpg';
Picture[4] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-4.jpg';
Picture[5] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-5.jpg';
Picture[6] = 'Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-6.jpg';
Alt[1] = "Barnum Brook from the Jenkins Mountain Trail";
Alt[2] = "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building";
Alt[3] = "New trail surfacing on the Hemlock Connector";
Alt[4] = "Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail";
Alt[5] = "Saint Regis Mountain from the trail in front of the VIC building";
Alt[6] = "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail";
Title[1] = "Barnum Brook from the Jenkins Mountain Trail";
Title[2] = "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building";
Title[3] = "New trail surfacing on the Hemlock Connector";
Title[4] = "Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail";
Title[5] = "Saint Regis Mountain from the trail in front of the VIC building";
Title[6] = "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail";
// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!
Caption[1] = "Barnum Brook from the Jenkins Mountain Trail";
Caption[2] = "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building";
Caption[3] = "New trail surfacing on the Hemlock Connector";
Caption[4] = "Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail";
Caption[5] = "Saint Regis Mountain from the trail in front of the VIC building";
Caption[6] = "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail";
// =====================================
// Do not edit anything below this line!
// =====================================
var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function control(how){
if (showHot){
if (how=="H") jss = 10;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
</script>
<!--
The next table cell holds the images.
Set cell and image width and height the same.
The img src must have name=PictureBox in its
tag. Often, the first image in the Picture
array in the script is used here; but you
may also use a different, introductory image
as we have here, since this image is shown
only on start-up.
//-->
<td width=468 colspan="3">
<div align="center">
<h1><font face="Arial, Helvetica, sans-serif" size="2"><br>
<b>Birding the Adirondacks:<br>
Teddy Roosevelt Bird Walk<br>
30 June 2012</b><br>
<br>
<img src=Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-3.jpg name=PictureBox width=468 height=357 border="1" alt="Birding the Adirondacks | Teddy Roosevelt Bird Walk (30 June 2012)">
</font></h1>
</div>
<font face="Arial, Helvetica, sans-serif" size="2"><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript><noscript> </noscript><noscript>
</noscript><noscript> </noscript></font><font size="2"><noscript>
</noscript><noscript> </noscript></font><noscript>
<center>
<font color="red" face="Arial, Helvetica, sans-serif" size="2"><a name="1"></a>You
have JavaScript turned off on your browser. To view the
entire slide show, please enable JavaScript.</font>
</center>
</noscript> </td>
</tr>
<!--
The following three cells contain the controls.
Each of the control a href's must contain class=
Controls, to attach the styles (see top of script).
To dress this up a bit, you can of course substitute
<img src> images for the text in the links.
//-->
<tr>
<td width=33% align="center"> <font face="Arial, Helvetica, sans-serif" size="2"><a class=Controls href="#1" onClick="javascript:control('B');">Previous
Slide</a></font></td>
<td width=33% align="center"> <font face="Arial, Helvetica, sans-serif" size="2"><a class=Controls href="#1" onClick="javascript:control('H');">First
Slide</a> </font></td>
<td width=33% align="center"> <font face="Arial, Helvetica, sans-serif" size="2">
<a class=Controls href="#1" onClick="javascript:control('F');">Next
Slide</a> </font></td>
</tr>
<tr>
<!--
The next table cell holds the captions.
This table cell must have id=CaptionBox and
class=Caption in its tag. The default caption
shows whilst loading in all browsers; NS4
will show only the default caption, throughout.
//-->
<td id=CaptionBox class=Caption align=center colspan="3"><font face="Arial, Helvetica, sans-serif" size="2"><br>
<b>TR Bird Walk Slide Show</b></font></td>
</tr>
</table>
</center>