Photo Album

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lucfer
Forum Newbie
Posts: 7
Joined: Tue Nov 08, 2005 7:59 pm

Photo Album

Post by lucfer »

Hi,

Let me straight away describe the scenario. I want to create a table with 2 columns. The left one will list down all the photos available (thumbnail). Each of the photos can be clicked. Once I clicked any of the photo thombnail, the photo will be displayed on the right column of the table in its original size.

I have tried to used <A HREF=...></A> to each of the thumbnails. This will call the page itself and display the requested photo on the right side of the table.

However, I think it is not wise to call the page again and again each time I click on any of the thumbnails because the page will have to load all the thumbnails again. Do you have any idea how should I make it so that it will automatically display the photo without calling the page again.

Thank you.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can use javascript to do an image swap...
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

If you have or can find some mouseover button javascript code, you can use it to do what you want to do. Instead of changing the image onMouseOver you would call he image swap onClick. You won't preload like mouseover code often does in the header.
(#10850)
lucfer
Forum Newbie
Posts: 7
Joined: Tue Nov 08, 2005 7:59 pm

Post by lucfer »

But I thought image swap is for the same <A HREF..></A>. Instead I want to display the original image on the right column. The thumbnail is on the left column fo the table. They are different image.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you don't have to swap the image that's being hovered... ;)
lucfer
Forum Newbie
Posts: 7
Joined: Tue Nov 08, 2005 7:59 pm

Post by lucfer »

I'll give it a try using the image swap thing.

Thank you very much.
Post Reply