Results 1 to 2 of 2

Thread: Help with photo album script V2.0

  1. #1
    Join Date
    Apr 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with photo album script V2.0

    http://www.dynamicdrive.com/dynamici...photoalbum.htm

    Hello Everyone, I have a problem with this particular script, and I don't know what is wrong with it. I am new to javascript, and would appreciate help from anyone.

    My problems:
    My confuse with this, I think, is where the jpg files are kept, and how do I get the Array to recognize it and load them. for example,

    var myvacation=new Array()
    myvacation[0]=["../photo1.jpg", "", "photo1-large.jpg"}

    how would this script locate the jpgs?

    I keep the jpg's in a folder called img.

    also, I get error in the server's error log stating that the +imgparts[2]+ can not be found

    please help

    thanks

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by phpboy View Post
    where [are] the jpg files kept, and how do I get the Array to recognize it and load them. for example,

    Code:
      var myvacation=new Array()
      myvacation[0]=["../photo1.jpg", "", "photo1-large.jpg"}
    how would this script locate the jpgs?

    I keep the jpg's in a folder called img.
    In the above code, the first item in the array ("../photo1.jpg") is where the image is located. If you keep your images in the "img" directory, the you would want to change the path to match your site:

    Code:
      var myvacation=new Array()
      myvacation[0]=["img/photo1.jpg", "", "photo1-large.jpg"}
    The second (, third, and fourth) item(s) in the Array are all optional. The second item is the title of the image (if you want to define one). The third item is the link destination (where you want the user to be redirected to when they click the image [if any]). The last item is the link target ("_blank", "myFrame", etc).

    If you wanted to get this done dynamically using PHP, you should look into using the PHP Photo Album Script.


    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •