Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Member #
    18943
    i'm making a web page that has a scroll box at the bottom with lots of small pictures in it and i want to make it so that when you click on one of these pictures, a bigger version appears in a box apove the scroll box like in photobucket.com
    i have an example of what i mean here

  2.  

  3. #2
    Senior Member
    Join Date
    Dec 2008
    Posts
    483
    Member #
    17875
    Liked
    1 times
    just from reading, i would say take a look at "lightbox" and "shadowbox"
    javascript used in a lot of image gallerys, probably the affect ur looking for

    http://www.huddletogether.com/projects/lightbox/ Heres lightbox

  4. #3
    Senior Member
    Join Date
    Dec 2008
    Posts
    483
    Member #
    17875
    Liked
    1 times
    taking a look at your example, maybe lightbox isnt what you want, however it would look a lot better.

    Anyways
    <head>
    <script type="text/javascript">
    function switchImage(url, altText){
    var elem=document.getElementbyId('displayImg');
    elem.src=url;
    elem.alt=altText;
    }
    </script>
    </head>

    --------------------------------------------------
    <div id="displayDiv">
    <img src="" id="displayImg" alt=""/>
    </div>

    <img src="test.jpg" onclick="switchImage('test.jpg', 'test image')"/>

    Something like this anyhow.
    Im sure you cna figure it out.
    you might want ot check the case on getElementById...if the case is wrong this wont work, just do a quick lookup

  5. #4
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Member #
    18943
    cool thanks this really helped :thumbsup:


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:24 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com