Jump to content

sweetdiss

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by sweetdiss

  1.  

    You could pass different image index values at the end of each link URL.

    <a href="slideshow.html?index=4">Slide 4</a>
    
    var loc = window.location.href;
    var  index = loc.indexOf('=');
    var value = loc.substr(index+1);
    alert(value);
    if (value>=0 && value<slides.length){
    slideIndex = value;
    }else{
    slideIndex = 1;
    }
    

     

    I tried this, but when the slideshow.html page loaded, it displayed the images going vertically down the page one after another, and not part of the slideshow itself anymore. The dots are all under the very last picture at the bottom, and the left/right arrows are gone. All the caption text is smooshed together at the bottom as well. Any idea what's going on?

  2. How do you intend to tell it which slide to start on? What URL would the links on the other page use?

     

    I have one page called designs.html which has links to different pictures. What I'm trying to do is have each of those links target my slideshow page (slideshow.html) with a specific image open on the slideshow. For example, link1 opens slideshow.html with image1 displayed on the slideshow, and link4 opens slideshow.html with image4 displayed.

     

    My only idea is to use hashes in the links, like <a href="slideshow.html#image1"> or something, but I don't know what to link to in order to have the slideshow display a specific image...

     

    Dave: I will try that, thanks! Just add the JavaScript to the slideshow's JS and that's it?

×
×
  • Create New...