Results 1 to 3 of 3

Thread: Newbie setting links help. V basic I am not too sharp

  1. #1
    Join Date
    Jan 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Newbie setting links help. V basic I am not too sharp

    Hi,

    I am new and I can not get any of the scripts working. I think I have just got confused on setting my links up.

    1) I am trying to use one of the slideshow scripts. Do I need to upload any code 1st to get it working? I am using Frontpage and copying the code into the html section. It does not show the picture when I go to preview and displays a box with a cross in indicating a bad link I guess?

    I have all my photos in a folder in the ftp: http://www.apartfromtherest.com/Photo/slide/

    f1.jpg - f20.jpg I take it that these should be in my Array?

    //specify images
    var slideimages=new Array("f1.jpg","f2.jpg","f3.jpg")


    and for the specify corresonding links I name the folder that they are all in on my web space i.e

    //specify corresponding links
    var slidelinks=new Array("http://www.apartfromtherest.com/Photo/slide/","http://www.apartfromtherest.com/Photo/slide/","http://www.apartfromtherest.com/Photo/slide/")


    I apologise for my ignorance and thank you in advance for any help.

    Kind regards

    Matt
    -------------------------------------
    <html>

    <head>
    <script language="JavaScript1.1">
    <!--

    //*****************************************
    // Blending Image Slide Show Script-
    // © Dynamic Drive (www.dynamicdrive.com)
    // For full source code, visit http://www.dynamicdrive.com/
    //*****************************************

    //specify interval between slide (in mili seconds)
    var slidespeed=3000

    //specify images
    var slideimages=new Array("f1.jpg","f2.jpg","f3.jpg")

    //specify corresponding links
    var slidelinks=new Array("http://www.apartfromtherest.com/Photo/slide/","http://www.apartfromtherest.com/Photo/slide/","http://www.apartfromtherest.com/Photo/slide/")

    var newwindow=0 //open links in new window? 1=yes, 0=no

    var imageholder=new Array()
    var ie=document.all
    for (i=0;i<slideimages.length;i++){
    imageholder[i]=new Image()
    imageholder[i].src=slideimages[i]
    }

    function gotoshow(){
    if (newwindow)
    window.open(slidelinks[whichlink])
    else
    window.location=slidelinks[whichlink]
    }

    //-->
    </script>
    </head>

    <body>
    <a href="javascript:gotoshow()"><img src="denizlong.jpg" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>

    <script language="JavaScript1.1">
    <!--

    var whichlink=0
    var whichimage=0
    var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
    function slideit(){
    if (!document.images) return
    if (ie) document.images.slide.filters[0].apply()
    document.images.slide.src=imageholder[whichimage].src
    if (ie) document.images.slide.filters[0].play()
    whichlink=whichimage
    whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
    setTimeout("slideit()",slidespeed+blenddelay)
    }
    slideit()

    //-->
    </script>

    <p align="center"><font face="arial" size="-2">This free script provided by<br>
    <a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

    </body>

    </html>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Nope, it is more like so:

    Code:
    //specify images
    var slideimages=new Array("http://www.apartfromtherest.com/Photo/slide/f1.jpg","http://www.apartfromtherest.com/Photo/slide/f2.jpg","http://www.apartfromtherest.com/Photo/slide/f3.jpg")
    That slidelinks array is for links, like if you want the page to change when someone clicks on an image. If you don't want any linking onclick of the images change this:

    HTML Code:
    <a href="javascript:gotoshow()">
    to:

    HTML Code:
    <a href="javascript:void(0)">
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Of course.

    Thanks you so much John Life saver!

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
  •