最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Refresh other frame, from another frame. Jquery - Stack Overflow

programmeradmin0浏览0评论

Is it possible to reload the page, where the user came from or, even better, reload the frame the user came from, if it matches an URL?

I have a link. The user clicks it, and it opens in a new window, a new url. A form will run in that new window. What I want, is a function to reload the first window (Where the user came from)

Is that possible?

Is it possible to reload the page, where the user came from or, even better, reload the frame the user came from, if it matches an URL?

I have a link. The user clicks it, and it opens in a new window, a new url. A form will run in that new window. What I want, is a function to reload the first window (Where the user came from)

Is that possible?

Share Improve this question asked Aug 8, 2011 at 11:20 Oliver 'Oli' JensenOliver 'Oli' Jensen 2,6519 gold badges27 silver badges40 bronze badges 2
  • parent.frame_name.location.reload(); – Gasim Commented Aug 8, 2011 at 11:23
  • But the parent frame, is not an iFrame. So how would it look then? – Oliver 'Oli' Jensen Commented Aug 8, 2011 at 11:25
Add a ment  | 

3 Answers 3

Reset to default 2

Alright. Here is what you do (just an example, tested, works):

test.html

<frameset cols="50%, 50%">
<frame name="f1" src="frame1.html">
<frame name="f2" src="frame2.html">
</frameset>

frame1.html

<input type="button" name="test" value="Refresh" onclick="parent.f2.location.reload()"> 

frame2.html

<span>Hello World</span>

variable parent is the parent of the current frame.

Read this page. its really helpful

Hope that helps

I think it is not possible if you open another window It would however be possible if you just use some kind of overlaying frame like jqmodal

the README should give you the necessary instructions: http://dev.iceburg/jquery/jqModal/README

How about loading the hyperlink url in the same page and redirect the user to the parent page after the form update is done.

发布评论

评论列表(0)

  1. 暂无评论