www.webdeveloper.com
Results 1 to 3 of 3

Thread: Please help!!!

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Please help!!!

    I have this simple java script for a gallery. Here's the code:

    <script type="text/javascript" language="javascript">
    function showPic (whichpic) {
    if (document.getElementById) {
    document.getElementById('placeholder').src = whichpic.href;
    if (whichpic.title) {
    document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
    } else {
    document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
    }
    return false;
    } else {
    return true;
    }
    }
    </script>

    It sets up a nice gallery with thumbnails but no image displayed. I simply want to change it so that it loads one of the images of the gallery automatically whereas the user/viewer would see one of the images as soon as they arrive at the page.

    So far, haven't been able to figure this out. It's probably easy for you guys. Does anyone know how to do this? I'd really appreciate it.

    Thanks.

  2. #2
    Join Date
    Mar 2009
    Posts
    452
    post your full code

  3. #3
    Join Date
    Nov 2012
    Posts
    32
    post your complete code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles