SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Photo Gallery

  1. #1
    SitePoint Addict TBanks's Avatar
    Join Date
    Jan 2003
    Location
    Earth:\USA\California
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Photo Gallery

    Hi,

    I'm trying to create a photo gallery page similar to these

    http://www.jcbphotos.com/gallery/headshots
    http://www.surrealstructures.com/VIZ_KitRef.html

    Can anyone point me to a tutorial on this - or help me find the code to create a page like this. I'm pretty beginner to jcreating javascript but I can paste it into my html pretty darn well. So something with explanation of how to would be great.

    Thanks!

    Toni
    dare to Dream, dare to Be...
    www.eodweb.com

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only the first one you listed uses javascript. The second site calls a new html page for each image. You can checkout the javascript here:
    http://www.jcbphotos.com/main/script.inc
    Just view src of that page.

    The idea for that gallery is simple. Once you layout your thumbnails and one large image. Each thumbnail should call a function to swap the image and pass to the function its image name.
    <a href="java script:swap('img01.jpg');">

    Your function simply changes the src of the large image.
    Code:
    function swap(img) {
    path = './path/to/images/folder/';
    document.imgLarge.src = path + img;
    }
    Not tested, but you get the idea.

    www.unpossiblemedia.com - A Fort Lauderdale based multimedia company.

  3. #3
    SitePoint Addict TBanks's Avatar
    Join Date
    Jan 2003
    Location
    Earth:\USA\California
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much!

    I'll give it a go

    Toni
    dare to Dream, dare to Be...
    www.eodweb.com


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
  •