jonnygrim Posted February 27, 2010 Share Posted February 27, 2010 Hi, Hope that someone can help me with a little problem I have. I building a little page that has some photos of the family. Ive created little thumbnails and large versions of each image. What im trying to achieve is that in div a: i have each of the thumbnails and in div b: it displays a large verison on the image thats clicked. Ive seen a few methods when searching using java and ajax etc, but i'm not sure which is the best way to do this and the most simple so that I dont have to create a new page for each image. Thanks for your help in advance. Quote Link to comment Share on other sites More sharing options...
jskywalker Posted February 27, 2010 Share Posted February 27, 2010 if i get this correct: you want to dispay the thumbnails, and when someone clicks, you want to show the larger picture? if both pictures are in the same page, than you are waisting bandwith, because both pictures need to be downloaded for this page changing from the 'thumb' to the 'large' cannot be done with PHP, because you need to do something client-side, and PHP only does things on the server-side... Quote Link to comment Share on other sites More sharing options...
jonnygrim Posted February 27, 2010 Author Share Posted February 27, 2010 Sorry no, I'm going to have the first image displayed in div b on page load, then as they click through the thumbnails div b changes as to which thumbnail they choose. Hope this makes it a little clearer. Thanks Quote Link to comment Share on other sites More sharing options...
jskywalker Posted February 27, 2010 Share Posted February 27, 2010 ok, but still, changes on client side cannot be doen with PHP, javascript is the choice for it. Quote Link to comment Share on other sites More sharing options...
kgrayjr Posted February 28, 2010 Share Posted February 28, 2010 Hi, Hope that someone can help me with a little problem I have. I building a little page that has some photos of the family. Ive created little thumbnails and large versions of each image. What im trying to achieve is that in div a: i have each of the thumbnails and in div b: it displays a large verison on the image thats clicked. Ive seen a few methods when searching using java and ajax etc, but i'm not sure which is the best way to do this and the most simple so that I dont have to create a new page for each image. Thanks for your help in advance. Javascript is the way to go, not going to do this with Xhtml or CSS (yet). The following link is a free script that should work for you. http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.