Solved

Frameset refresh problem with php vs htm

Posted on 2002-04-10
7
542 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP populating an array. 4 24
write screen output to text file 21 47
Decrypt string by php 7 31
how to use a switch statement with heredoc 11 23
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

770 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