Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Nov 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need 2 same scripts on page

    I am a total newbie at JS. I have to run 2 image rotators/links on the same page. I am banging my head against the wall.

    Here is what I have. Can anyone tell me how to fix the errors(slideimages2 is null or not an object.... Thanks:

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>Autograph Signings - SigningsHotline.com</title>
    <script language="JavaScript1.1" type="text/javascript">
    <!--
    /*
    JavaScript Image slideshow:
    By JavaScript Kit (www.javascriptkit.com)
    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>
    <script language="JavaScript1.1" type="text/javascript">
    <!--
    /*
    JavaScript Image slideshow:
    By JavaScript Kit (www.javascriptkit.com)
    Over 200+ free JavaScript here!
    */
    var slideimages2=new Array()
    var slidelinks2=new Array()
    function slideshowimages2(){
    for (j=0;j<slideshowimages2.arguments.length;j++){
    slideimages2[j]=new Image()
    slideimages2[j].src=slideshowimages2.arguments[j]
    }
    }
    function slideshowlinks2(){
    for (j=0;j<slideshowlinks2.arguments.length;j++)
    slidelinks2[j]=slideshowlinks2.arguments[j]
    }
    function gotoshow2(){
    if (!window.winslide||winslide.closed)
    winslide=window.open(slidelinks2[whichlink2])
    else
    winslide.location=slidelinks2[whichlink2]
    winslide.focus()
    }
    //-->
    </script>
    </head>
    <body vlink="#0000FF" bgcolor="#FFFFFF">
    <a href="javascript:gotoshow()"><img src="images/triumph04/esmith.JPG" name="slide" border=1 width=97 height=135></a>
    <script>
    <!--
    //configure the paths of the images, plus corresponding target links
    slideshowimages("images/triumph04/esmith.JPG", "images/triumph04/csonka.JPG", "images/triumph04/elway.JPG", "images/triumph04/cmartin.JPG", "images/triumph04/bradshaw.JPG", "images/triumph04/rose.JPG", "images/triumph04/marino.JPG", "images/triumph04/sanders.JPG", "images/triumph04/ryan.jpg")
    slideshowlinks("http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp")
    //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>
    <a href="javascript:gotoshow2()"><img src="images/triumph04/esmith.JPG" name="slide2" border=1 width=97 height=135></a>
    <script>
    <!--
    //configure the paths of the images, plus corresponding target links
    slideshowimages2("images/triumph04/esmith.JPG", "images/triumph04/csonka.JPG", "images/triumph04/elway.JPG", "images/triumph04/cmartin.JPG", "images/triumph04/bradshaw.JPG", "images/triumph04/rose.JPG", "images/triumph04/marino.JPG", "images/triumph04/sanders.JPG", "images/triumph04/ryan.jpg")
    slideshowlinks2("http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp", "http://www.footballspectacular.com/confirmedguests.asp")
    //configure the speed of the slideshow, in miliseconds
    var slideshowspeed2=2000
    var whichlink2=0
    var whichimage2=20
    function slideit2(){
    if (!document.images)
    return
    document.images.slide2.src=slideimages2[whichimage2].src
    whichlink2=whichimage2
    if (whichimage2<slideimages2.length-1)
    whichimage2++
    else
    whichimage2=0
    setTimeout("slideit2()",slideshowspeed2)
    }
    slideit2()
    //-->
    </script>
    </body>
    </html>
    Last edited by hzarabet; 03-19-2004 at 02:38 AM.
    SigningsHotline.com list EVERY athlete autograph appearance in the US and Canada!


 

Posting Permissions

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