Solved

Frameset refresh problem with php vs htm

Posted on 2002-04-10
7
539 Views
Last Modified: 2012-08-13
I have a simple frameset like this:

<frameset cols="50%,*">
<frame src="test2.php" name="menu" >
<frame src="test3.php" name="main" >
</frameset>

// test2.php
<html>
<body>
test2
<a href="test3.php">load test3</a>
</body>
</html>

// test3.php
<html>
<body>
test3
</body>
</html>


Now when I upload the frameset as frameset.htm it runs fine.  Then using the link I can get test3 in both subpages.  Hitting the browser refresh leaves test3 in both subpages.  

But if I save the frameset as frameset.php and follow the same steps it does NOT leave test3 in both pages.  Instead it reloads the default test2.php.

What is going on?  I am not using any php code in this example.  Is this something to do with headers?
0
Comment
Question by:kaller2
  • 5
  • 2
7 Comments
 
LVL 2

Author Comment

by:kaller2
ID: 6932781
BTW I am using IE 5.5, I would be interested to know if this behaviour is browser dependent.
0
 
LVL 2

Author Comment

by:kaller2
ID: 6932783
Also I am using a hosted service PHP 4.1.2 on Apache if that is any help.
0
 
LVL 2

Author Comment

by:kaller2
ID: 6933290
Hmm why when I increase points it still says the old ones?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6933400
There is not a problem with the PHP every scripting language so the same whenever you refresh the page the request goes to the server and it loaded the page as fresh but when using the htm it opens the file from its cache and thats why you are watching the page as it is but when you refresht the php file the request goest to the webserver and it send the result to the browser..


Harry
0
 
LVL 2

Author Comment

by:kaller2
ID: 6933501
So the cached frameset reloads the current subpages, but if I reload the frameset I get the default subpages.
That makes sense but I don't like it.  

The users ought to be able to click on the main toolbar refresh and not revert to the default subpages, and this may be what happens with IE6 ?.

Anyway it looks as if I should leave my frameset as an html file.  The reason I converted it to a php file was to send it a querystring.  Will the frameset always refresh to the server if it has a querystring like this?

frameset.html?url=test4.php
0
 
LVL 5

Accepted Solution

by:
harwantgrewal earned 200 total points
ID: 6933506
ya if you want to display the page as it is you can manipulate the structure like this

<?if(!isset($ur){
$url=test2.php;
}?>
<frameset cols="50%,*">
<frame src="<?echo $url?>" name="menu" >
<frame src="test3.php" name="main" >
</frameset>

// test2.php
<html>
<body>
test2
<a href="javascrip:void(0)" onclike="top.location='frameset.php?url=test2.php'>load test3</a>
</body>
</html>

Harry
0
 
LVL 2

Author Comment

by:kaller2
ID: 6933633
Yup.  Onward....

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now