开发者

How to refresh all pages in a frameset

开发者 https://www.devze.com 2022-12-31 13:48 出处:网络
Using PHP I would like to force the browser to refresh all pages开发者_C百科 (frames) in the frameset, as if the user had pressed the F5 button.

Using PHP I would like to force the browser to refresh all pages开发者_C百科 (frames) in the frameset, as if the user had pressed the F5 button.

When I use

header("Location: frameset.php"); 

it reloads the whole frameset into one frame.


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>


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>;
0

精彩评论

暂无评论...
验证码 换一张
取 消