Results 1 to 5 of 5

Thread: Thumbnail Viewer II Pictures have gone when uploaded

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Thumbnail Viewer II Pictures have gone when uploaded

    1) Script Title: Thumbnail Viewer II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem: I think im using an older version of this script, but it works fine on the hard drive but when i up load it to web space the pictures will not change they stay blank and the forward and backward buttons no longer work.

    I think it has something to do with the location of the files, do the images need to be in the same folder as the htm file ?

    I have uploaded it to this address so you can see.

    http://homepage.ntlworld.com/berty70...hemes/bond.htm

    should I upgrade to the newer version of the script ?

    I hope you can help.

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Two things to check:
    1) Is the path correct?
    2) Is the case correct?

    The path is showing that the images should be located in http://homepage.ntlworld.com/berty70...mages/gallery/ Is that where they are?
    Second, website images are case sensitive, so images/myimage.jpg and Images/myImage.JPG are two different paths.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    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

    Looks like its the path, as Jas suggests, the images are in:

    Code:
    http://homepage.ntlworld.com/berty70/bob/images/gallery/
    not:

    Code:
    http://homepage.ntlworld.com/berty70/bob/themes/images/gallery/
    although the gal0.jpg seems to be missing altogether. There is a gal0.gif though. Change this:

    Code:
    //Specify image paths and optional link (set link to "" for no link):
    var dynimages=new Array()
    dynimages[0]=["images/gallery/gal0.jpg", ""]
    dynimages[1]=["images/gallery/gal1.jpg", ""]
    dynimages[2]=["images/gallery/gal2.jpg", ""]
    dynimages[3]=["images/gallery/gal3.jpg", ""]
    dynimages[4]=["images/gallery/gal4.jpg", ""]
    dynimages[5]=["images/gallery/gal5.jpg", ""]
    dynimages[6]=["images/gallery/gal6.jpg", ""]
    to:

    Code:
    //Specify image paths and optional link (set link to "" for no link):
    var dynimages=new Array()
    dynimages[0]=["../images/gallery/gal0.gif", ""]
    dynimages[1]=["../images/gallery/gal1.jpg", ""]
    dynimages[2]=["../images/gallery/gal2.jpg", ""]
    dynimages[3]=["../images/gallery/gal3.jpg", ""]
    dynimages[4]=["../images/gallery/gal4.jpg", ""]
    dynimages[5]=["../images/gallery/gal5.jpg", ""]
    dynimages[6]=["../images/gallery/gal6.jpg", ""]
    The back and forth buttons look like they need some work too.
    Last edited by jscheuer1; 01-25-2008 at 05:02 AM. Reason: add highlighting
    - John
    ________________________

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

  4. #4
    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

    Ah yes, if using the ../ in the dynimages array, you need to modify this (addition red):

    Code:
    //Starting here is the modification that John made for me to allow forward and back buttons
    function findLoaded(){
    if(typeof document.getElementById('dynloadarea').getElementsByTagName('img')[0]!=='undefined'){
    var theImg = document.getElementById('dynloadarea').getElementsByTagName('img')[0].src
    for (var i_tem = 0; i_tem < dynimages.length; i_tem++)
    if (theImg.indexOf(dynimages[i_tem][0].replace(/\.\.\//,''))>-1)
    return i_tem
    }
    else
    return -1
    }
    in order for the back and forth buttons to work right.
    - John
    ________________________

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

  5. #5
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Thanks

    You Guys 'ROCK' this worked fantastically and what a very quick response.

    Thanks again.

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
  •