Advanced Search

Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: Alt and Title Attributes for Codelifter Javascript Slideshow

  1. #11
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,533
    Thanks
    2
    Thanked 350 Times in 346 Posts

    Default

    none of the images in my slideshows are being indexed by Google, because they don't have Alt or Title attributes.
    to allow indexing the images must be defined in the HTML Code

    as for the changing layout, that is because of the table definition

    see

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    
    </head>
    
    <body>
    <table border=1 cellpadding=0 cellspacing=0>
                      <tr>
                        <!--
        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 colspan="3">
                          <div >
                            <h1 style="text-Align:center;"><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></h1>
                              <div id="PictureBox" style="position:relative;left:35px;width:468px;height:357px;border:solid red 0px;" >
      <img src="http://www.adirondackvic.org/Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-1.jpg" width=468 height=357  border="1" alt="Barnum Brook from the Jenkins Mountain Trail" title="Barnum Brook from the Jenkins Mountain Trail" />
      <img src="http://www.adirondackvic.org/Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-2.jpg" width=468 height=357  border="1" alt="Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building" title="Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building" />
      <img src="http://www.adirondackvic.org/Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-3.jpg" width=468 height=357  border="1" alt="New trail surfacing on the Hemlock Connector" title="New trail surfacing on the Hemlock Connector" />
      <img src="http://www.adirondackvic.org/Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-4.jpg" width=468 height=357  border="1" alt='Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail' title='Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail' />
      <img src="http://www.adirondackvic.org/Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-5.jpg" width=468 height=357  border="1" alt="Saint Regis Mountain from the trail in front of the VIC building" title="Saint Regis Mountain from the trail in front of the VIC building" />
      <img src="http://www.adirondackvic.org/Images/Adirondack-Birding-Center-Bird-Walk-30-June-2012-6.jpg" width=468 height=357  border="1" alt="Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail" title="Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail"  />
                              </div>
                              </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=180 align="center"> <font face="Arial, Helvetica, sans-serif" size="2"><a class=Controls href="#1" onClick="return zxcSlideShow.Next('PictureBox',-1);">Previous
                          Slide</a></font></td>
                        <td width=180 align="center"> <font face="Arial, Helvetica, sans-serif" size="2"><a class=Controls href="#1" onClick="return zxcSlideShow.GoTo('PictureBox',0);">First
                          Slide</a> </font></td>
                        <td width=180 align="center"> <font face="Arial, Helvetica, sans-serif" size="2">&nbsp;&nbsp;
                          &nbsp;<a class=Controls href="#1" onClick="return zxcSlideShow.Next('PictureBox',1);">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  class=Caption align=center colspan="3"><font face="Arial, Helvetica, sans-serif" size="2"><br>
                          <b><span id="CaptionBox" >TR Bird Walk Slide Show</span></b></font></td>
                      </tr>
    
    <script type="text/javascript">
    /*<![CDATA[*/
    
    var zxcSlideShow={
    
     init:function(o){
      var id=o.SlideShowID,obj=document.getElementById(id),imgs=obj.getElementsByTagName('IMG'),txt=document.getElementById(o.CaptionID),cary=o.CaptionArray,ms=o.FadeDuration,img,ary=[],nu=o.DisplayNumber,nu=typeof(nu)=='number'&&imgs[nu]?nu:0,z0=0;
      for (;z0<imgs.length;z0++){
       imgs[z0].style.position='absolute';
       imgs[z0].style.zIndex=z0!=nu?'0':'1';
       imgs[z0].style.left='0px';
       imgs[z0].style.top='0px';
       ary[z0]=[imgs[z0],cary[z0]||imgs[z0].title||'','dly'+z0,z0!=nu?0:100];
       this.opac(imgs[z0],z0!=nu?0:100);
      }
      if (txt){
       txt.innerHTML=ary[nu][1];
      }
      this[id]={
       ary:ary,
       lgth:ary.length-1,
       txt:txt,
       ms:typeof(ms)=='number'?ms:1000,
       cnt:nu
      }
     },
    
     Next:function(id,ud,goto){
      var o=this[id];
      if (o){
       var cnt=typeof(goto)=='number'?goto:o.cnt+ud,cnt=cnt>o.lgth?0:cnt<0?o.lgth:cnt;
       o.ary[o.cnt][0].style.zIndex='0';
       this.animate(o.ary[o.cnt],o.ary[o.cnt][3],0,new Date(),o.ms,o.ary[o.cnt][2]);
       o.ary[cnt][0].style.zIndex='1';
       this.animate(o.ary[cnt],o.ary[cnt][3],100,new Date(),o.ms,o.ary[cnt][2]);
       if (o.txt){
        o.txt.innerHTML=o.ary[cnt][1];
       }
       o.cnt=cnt;
      }
      return false;
     },
    
     GoTo:function(id,goto){
      var o=this[id];
      if (o&&o.ary[goto]&&goto!==o.cnt){
       this.Next(id,0,goto);
      }
     },
    
     animate:function(ary,f,t,srt,mS,to){
      var oop=this,ms=new Date().getTime()-srt,now=(t-f)/mS*ms+f;
      if (isFinite(now)){
       this.opac(ary[0],now);
       ary[3]=now;
      }
      if (ms<mS){
       this[ary[2]]=setTimeout(function(){ oop.animate(ary,f,t,srt,mS,to); },10);
      }
      else {
      }
     },
    
     opac:function(obj,now){
      obj.style.filter='alpha(opacity='+now+')';
      obj.style.opacity=obj.style.MozOpacity=obj.style.WebkitOpacity=obj.style.KhtmlOpacity=now/100-.001;
     }
    
    
    }
    
    zxcSlideShow.init({
     SlideShowID:'PictureBox', // the unique ID name of the image container DIV.          (string)
     CaptionArray:[                // an array defining the image captions.                (array)
      "Barnum Brook from the Jenkins Mountain Trail",
      "Adirondack Wildflowers: Spreading Dogbane blooming near the VIC building",
      "New trail surfacing on the Hemlock Connector",
      'Adirondack Wildflowers: Common Wood Sorrel blooming on the Boreal Life Trail',
      "Saint Regis Mountain from the trail in front of the VIC building",
      "Adirondack Wildflowers: Partridge Berry blooming on the Boreal Life Trail"
     ],
     CaptionID:'CaptionBox',   //(optional) the unique ID name of the 'caption' element.  (string, default = no captions)
     FadeDuration:1000,        //(optional) the fade duration in milli seconds.           (number, default = 1000)
     DisplayNumber:3           //(optional) the initial image index number.               (number, default = 0)
    });
    /*]]>*/
    </script>
    </body>
    
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org.uk/
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  2. The Following User Says Thank You to vwphillips For This Useful Post:

    ellenjones6 (07-08-2012)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •