views:

282

answers:

2

Hi everyone ,,

using php I would like to force the browser to refresh all pages

-frams- in the frameset ,

as if the user had press F5 button.

when I use header("Location: frameset.php"); it reload the whole frameset int one frame which had the action

any help is Appreciated :)

A: 

Are you trying to reload the entire page from within a frame? It's hard to tell what you need to do...

Something like:

<a href="#" onclick="parent.location.reload();">Reload</a>;
mmattax
thx mmattaxI have a button so this worked for me:<input name="submit-btn" type="submit" value="submit" onclick="parent.location.reload();">
arwa
A: 

Yes, stay away from frames if at all possible. PHP can't really do this using a header redirect, you would have to use javascript to target the parent frame and reload that. So something like:

<script type="text/javascript">
parent.location.reload();
</script>
Jonathan Kuhn
whats the problem with frames?!
arwa
Frames are considered to be bad design. They can be used effectively, but most likely not. You are almost always better off loading through ajax or simply including a file in php. They break the expected behavior of the back button (only the last frame that changed urls will go back, not the entire page) and often times add un-needed scroll bars (a scroll on every frame) that confuse people. Also there used to be trouble with search engine spiders not indexing your site and chances are it won't index it properly if it can. Like tables, they have their uses, but not as the main design.
Jonathan Kuhn
Ooh.. thanks for the reply Jonathan
arwa