[web] Photo Gallery
Any ideas on setting up a good photo gallery? Or any links to some really good designs?
I kind of want any given picture to open in a new window, to make things easy and so the page doesn't have to reload all the time. Is this a good idea? Would pop-up blockers block this or no?
Tips and ideas welcome. Links too. Anything on setting up a good image gallery. Thank you!!
You could use javascript to load another image into an IMG element when a button is clicked or something... Assuming your images are simply indexed (i.e. img10.gif, img11,gif, img12.gif, etc.), then you can just search for the next image. If the file doesn't exist, either wrap to the first image, or do nothing.
If your images don't go in order numerically and you're looking to do something more advanced, create a dynamic page that takes a query string containing the current image index, such as...
http://yoursite/getNextImage?curImg=1027
Then the getNextImage page could perhaps return some XML like the following:
Simply call this page in your javascript, and you can parse the XML to display the image in the same page as in the first example.<br><br>Hopefully that made sense, I'm distracted playing Texas Hold'em online :-P
If your images don't go in order numerically and you're looking to do something more advanced, create a dynamic page that takes a query string containing the current image index, such as...
http://yoursite/getNextImage?curImg=1027
Then the getNextImage page could perhaps return some XML like the following:
<?xml version="1.0" ?><image id="1043"> <src>/images/img1043.gif</src> <nextImg>1057</nextImg></image>
Simply call this page in your javascript, and you can parse the XML to display the image in the same page as in the first example.<br><br>Hopefully that made sense, I'm distracted playing Texas Hold'em online :-P
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement