开发者

How to refresh all pages in a frameset

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜