View Full Version : Gallery - basic coding help [+REP]
Holofoil
07-12-2008, 10:35 AM
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?
Decode
07-12-2008, 10:54 AM
javascript:
function change(img) {
update = document.GetElementById("image");
update.innerHTML = '<img src="images/'+img+'" />';
}
Put this where you want the image to be displayed
<div class="image"></div>
The image links should be changed to
<a href="#" onclick="change('imagenamehere.png')"><img src="thumbofimage" /></a>
There might be some errors, my javascript isn't the best ;)
Holofoil
07-12-2008, 11:20 AM
lol I'm already confused.. What goes in those brackets? Which pic?
Decode
07-12-2008, 11:30 AM
I will make a live example for you, give me a few minutes :)
Holofoil
07-12-2008, 11:33 AM
ooh thanksss
Decode
07-12-2008, 11:51 AM
http://tom743.awardspace.com/demo/
View the source for the code.
-x--Jessica--x-
07-12-2008, 12:16 PM
Sry Mate, I Dunno :S
Holofoil
07-12-2008, 12:23 PM
Do I have to use the javascript? Im just using html
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.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.