Hi, I’m building a program in PHP which allows the user to add graphics to a background. The user uploads multiple images and presses the submit button. Upon submit, the screen refreshes, but the image does not change. After the page updates, I can hit the refresh button on the browser menu, or press f5. The changes are then displayed. However, I would like the changes to be displayed after the user presses the submit button. It works great in FireFox, but it seems that IE is doing the original refresh before the data is processed, or it’s trying to pull old cached values.
I’ve tried the <meta http-equiv=”refresh” content=”1″>, but it keeps requesting the page over and over. So, I put the image in it’s own iframe. However, it continually makes requests to the server for the image and it displays that loading status bar at the bottom of the screen over and over.
I tried creating a loop and then setting the content value as an incrementing variable. Like this:
for($i=0; $i<=100; $i+50)
{
<meta http-equiv=”refresh” content=”$i”>
}
However, what I realized is that $i will not increment because the meta tag is itself an eternal loop. If I put a print statement after it within the for loop, it will not print, because it never reaches it. It just keeps looping forever within the meta tag. I wish there was some break statement that you could put in the meta tag. For instance, wouldn’t it be great if you could do something like <meta http-equiv=”refresh” content=”1″ stop =”5″> so it would stop looping after 5 refreshes (or whatever you want). Of course this statement is not valid. However, does anyone know of any value I can put in the meta tag that would give me the effect I need? Oh, and I don’t want to use java script.
I’ve also tried to redirect the image to the frame: Header(Location: $image_location); However, the same thing happens and I can’t seem to find a way to specifiy an image size on redirects.
It’s not a design issue, I’ve tried putting the iframe after all the data has been processed, just to see if maybe I just called the image too soon. I believe it is a problem with IE since Fire Fox works perfectly.
Also, there is a possibilty that it has to do with cached images. But, I don’t know how to delete a single cached image before calling the image. The program works within a session, so I don’t want to delete the entire cache.
Does anyone have any code or pointers. Or have you also experienced this with IE? Thanks for you help.