Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Location
    Warwickshire
    Posts
    824
    Tokens
    0

    Default Gallery - basic coding help [+REP]

    Hi, I'm just doing a basic online gallery, nothing special. I've got a row of 63x63 images which when I click, open a whole picture in a new window. I want to have the picture come up under this row of 63x63 images instead, and then change when I click the other ones.
    I'm guessing it's pretty straightforward?
    Last edited by Holofoil; 07-12-2008 at 10:37 AM.
    Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it. - Terry Pratchett

  2. #2
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    javascript:

    Code:
    function change(img) {
        update = document.GetElementById("image");
        update.innerHTML = '<img src="images/'+img+'" />';
    }

    Put this where you want the image to be displayed
    HTML Code:
    <div class="image"></div>
    The image links should be changed to
    HTML Code:
    <a href="#" onclick="change('imagenamehere.png')"><img src="thumbofimage" /></a>
    There might be some errors, my javascript isn't the best
    Lets set the stage on fire, and hollywood will be jealous.

  3. #3
    Join Date
    May 2006
    Location
    Warwickshire
    Posts
    824
    Tokens
    0

    Default

    lol I'm already confused.. What goes in those brackets? Which pic?
    Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it. - Terry Pratchett

  4. #4
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    I will make a live example for you, give me a few minutes
    Lets set the stage on fire, and hollywood will be jealous.

  5. #5
    Join Date
    May 2006
    Location
    Warwickshire
    Posts
    824
    Tokens
    0

    Default

    ooh thanksss
    Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it. - Terry Pratchett

  6. #6
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    http://tom743.awardspace.com/demo/

    View the source for the code.
    Lets set the stage on fire, and hollywood will be jealous.

  7. #7
    Join Date
    Nov 2008
    Posts
    116
    Tokens
    0

    Default

    Sry Mate, I Dunno :S

  8. #8
    Join Date
    May 2006
    Location
    Warwickshire
    Posts
    824
    Tokens
    0

    Default

    Do I have to use the javascript? Im just using html
    Last edited by Holofoil; 07-12-2008 at 12:27 PM.
    Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it. - Terry Pratchett

  9. #9
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Quote Originally Posted by Holofoil View Post
    Do I have to use the javascript? Im just using html
    You could do it with just html, but it would look quite tacky. The image would open in a new tab in firefox.

    If you want nice looking version of this google litebox.
    Last edited by Jxhn; 07-12-2008 at 03:23 PM.

Posting Permissions

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