SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: how do I...

  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)

    how do I...

    I posted in "just starting", it was suggested I repost here. I have no JS experience, I do have a working knowledge of HTML and can use DW. I've been able to cut and paste some other scripts and get them to work so I kind of understand some things.

    Anyway, I want to make a page to display pictures with thumbnails in one spot and a "display" area for the large version which is displayed as you click on the thumbnail. I don't really know where to begin or where to find a tutorial or info on something like this. Any suggestions?

    this website illustrates what I'm looking for.

    Thanks

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

  2. #2
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Hey,

    This is pretty easy to do. You just need to create a function to do all the work

    You'll need to create the placeholder for the larger image and give it an ID
    Code:
    <img id='placeholder' src='...
    and then write a function like this
    Code:
    function swapImage(img)
    {
       document.getElementById('placeholder').src = img;
    }
    and then use it in your site like this
    Code:
    <!--
    thumbnail path: /thumbs/001.gif
    full image path: /001.gif
    -->
    <img src='/001.gif' alt='001.gif' onClick="swapImage('/thumbs/001.gif')" />
    and *ta daaaaaaaaaaa*, it's done

  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)
    Cool - thanks! I'll give it a go. I love this forum!

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

  4. #4
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Originally posted by TBanks
    I love this forum!
    Me too!


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
  •