Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Trouble with PHP & Frames

Trouble with PHP & Frames
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Dec 22, 2003, 10:56 PM
 
Here's my dilema. I have a page that is a frameset. It picks frame A via PHP code and loads it. The then loads frame B, and sends the address of frame A via the url. (e.g. frameb.php?q=framea.php) So on So frame B has a link that reloads the whole frame set, so it will execute the PHP code again and reload a new A frame. It also has a button that sends the frame A to the top, smashing frames and just showing that page. OK Did I lose anyone yet so far?

If not, now to the problem. Its very buggy. In Safari the button to reload the framset does reload it all ,but it loads the same frame A, as if it doesn't re-execute the php code. Same goes for the reload button. I added a no-cache tag but it had no effect. Now on IE for windows, this button works fine. Now the other button, that essentially closes frame B and opens A full-window. In safari it works great. In IE for windows, it gets rid of the frame B, but its almost as if it executes the php again, because it loads a new frame A. But thats impossible, because the code is in the frameset, not the frame itself, and if its only loading the frames without the frameset, then there is no code to execute?! I'm not sure what exactly my problems are. Do you have any ideas?
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Dec 23, 2003, 06:38 PM
 
Let me ask this a different way. I have a page with code on it. I put no-cache meta tags in the page. The page links to itself so as to reload the page and execute the php on it, giving you a different result. It works in every browser i tried, except safari. Its impossible for the code to give you the same result, so safari is caching pages even though its not supposed to be. Any ideas how I can work around this?
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Dec 23, 2003, 08:38 PM
 
Solution...

[php]<? php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>[/php]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:35 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2