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
3 Answers
Reset to default 2Alright. 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.