Search code examples
javascriptshowslidewindow.open

FadeSlideShow - Javascript target = "_blank"


I have a slide of images on my site and im wanting there links to open in a new window...

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [860, 500], //width/height of gallery in pixels. Should reflect dimensions        of largest image
imagearray:  [
    ["mil/aircrafthangar.jpg", "http://www.rubbmilitary.com/products/aircraft_hangars.html", "", "Rubb Military 20m Span EFASS Aircraft and Helicopter Hangar"],
    ["mil/helihangar.jpg", "http://www.rubbmilitary.com/products/helicopter_hangars.html", "", "Rubb Military 25m Span EFASS Aircraft and Helicopter Hangars"],
    ["mil/vehiclehangar.jpg", "http://www.rubbmilitary.com/products/small_aircraft_hangars.html", "", "Rubb Military 11m Span EFASS Vehicle and small Aircraft Hangars"],
    ["mil/sunshade.jpg", "http://www.rubbmilitary.com/products/aircraft_sunshades.html", "", "Rubb Military EFASS Sunshade Covering Aircraft and Helicopters"],
    ["mil/warehouse.jpg", "http://www.rubbmilitary.com/products/military_warehouse.html", "", "Rubb Military EFASS Mass Storage Warehouse"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 1000, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""

})

</script>

any help or advice would be great.

Thanks you


Solution

  • The third parameter of the image array is probably the target of hyperlink. Try this.

    ["mil/aircrafthangar.jpg",
    "http://www.rubbmilitary.com/products/aircraft_hangars.html",
    "_blank",
    "Rubb Military 20m Span EFASS Aircraft and Helicopter Hangar"]
    

    You should use "_blank" for every image in array.