Solved

Frameset refresh problem with php vs htm

Posted on 2002-04-10
7
537 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
The viewer will learn how to count occurrences of each item in an array.
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…

706 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

13 Experts available now in Live!

Get 1:1 Help Now