Slideshow links

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eligius
    New Member
    • Jun 2006
    • 2

    Slideshow links

    Found this neat slideshow javascript with linked images. Is it at all possible to change the properties (height, with, etc.) of the opened window of every individual link?

    Code:
     <script language="JavaScript1.1"> 
    <!--
     
    /*
    JavaScript Image slideshow:
    By JavaScript Kit ([url="http://www.javascriptkit.com/"]www.javascriptkit.com[/url])
    Over 200+ free JavaScript here!
    */
     
    var slideimages=new Array()
    var slidelinks=new Array()
    function slideshowimages(){
    for (i=0;i<slideshowimages.arguments.length;i++){
    slideimages[i]=new Image()
    slideimages[i].src=slideshowimages.arguments[i]
    }
    }
     
    function slideshowlinks(){
    for (i=0;i<slideshowlinks.arguments.length;i++)
    slidelinks[i]=slideshowlinks.arguments[i]
    }
     
    function gotoshow(){
    if (!window.winslide||winslide.closed)
    winslide=window.open(slidelinks[whichlink])
    else
    winslide.location=slidelinks[whichlink]
    winslide.focus()
    }
     
    //-->
    </script>
     
    <a href="javascript:gotoshow()"><img src="food1.jpg" name="slide" border=0 width=300 height=375></a>
    <script>
    <!--
     
    //configure the paths of the images, plus corresponding target links
    slideshowimages("food1.jpg","food2.jpg","food3.jpg","food4.jpg","food5.jpg")
    slideshowlinks("http://food.epicurious.com/run/recipe/view?id=13285","http://food.epicurious.com/run/recipe/view?id=10092","http://food.epicurious.com/run/recipe/view?id=100975","http://food.epicurious.com/run/recipe/view?id=2876","http://food.epicurious.com/run/recipe/view?id=20010")
     
    //configure the speed of the slideshow, in miliseconds
    var slideshowspeed=2000
     
    var whichlink=0
    var whichimage=0
    function slideit(){
    if (!document.images)
    return
    document.images.slide.src=slideimages[whichimage].src
    whichlink=whichimage
    if (whichimage<slideimages.length-1)
    whichimage++
    else
    whichimage=0
    setTimeout("slideit()",slideshowspeed)
    }
    slideit()
     
    //-->
    </script>
    <p align="center"><font face="arial" size="-2">This free script provided by</font><br>
    <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
    Kit</a></font></p>
    Last edited by Niheel; Jun 24 '06, 03:02 PM.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I quick glance suggests not because the script does not necessarily open a new window for each new picture displayed.

    Comment

    • eligius
      New Member
      • Jun 2006
      • 2

      #3
      Originally posted by Banfa
      I quick glance suggests not because the script does not necessarily open a new window for each new picture displayed.
      Thanks very much for the reply! Could you perhaps suggest another simple script which does support the the possibility to change the size of each new picture?

      Comment

      • danjam
        New Member
        • Jun 2006
        • 7

        #4
        Here is an image viewer, that opens images in a new window when clicked.

        It's in object-oriented, cross-browser JavaScript. Very easy to plug and play, with "slide show" feature, and fully customisable in CSS and HTML:

        JavaScript image viewer

        Article includes a demo, source code, explanations.

        Hope this helps...

        Comment

        Working...