Solved

Frameset refresh problem with php vs htm

Posted on 2002-04-10
7
546 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

828 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