PDA

View Full Version : PHP indexed image not refreshing...



erikbeam
27 May 2008, 12:09 PM
I hope I don't get too long-winded describing this. I've got the typical photo gallery. Using iframes, I've got menu on the left, the big image in the center, and a table of thumbnails on the right. The center iframe is .../bigpic1.php. Each thumbnail, when clicked will open .../bigpic1.php?thumb=1 or ...?thumb=2, etc...

In /bigpic1.php, I'm using the trick where the image is the background and there's a transparent .gif file directly over it, so the callout for the actual image is in the style sheet:




{
background-image:url('<?php
$thumbnum = $_GET['thumb'];
echo $thumbnum;
?>.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
}


Everything works perfectly as you click down the thumbnails, except the original background image never changes. When I view source on the center frame I see:




{
background-image:url('3.jpg')
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
}


Or whichever number thumbnail was clicked, the code is working, but I still see 1.jpg as the image. I thought it might have something to do with the iframes, so I right-clicked "Open in new window" and it's the same effect. I've verified that all the 1.jpg, 2.jpg, 3.jpg, etc... images are where they need to be, and even opened them manually .../1.jpg to see them. Is this something to do with refreshing the background? If I just hit refresh it does nothing, nor does Ctrl+F5.

Any ideas?