?
Solved

refresh parent window from child window close button

Posted on 2007-10-11
3
Medium Priority
?
932 Views
Last Modified: 2012-06-27
i have a parent window that opens a child window.  the user enter data into the child windows form and submits the child.  the child window also contains a close button.  when clicked i want to refresh the parent window but it isnt working:

<input type="button" onclick="javascript:parent.opener.location.refresh();this.close();" name="closeBtn" value="Close" />

When i click close, the child window close, but my parent window does not refresh.
0
Comment
Question by:ellandrd
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
brunoguimaraes earned 2000 total points
ID: 20057312
Try window.opener instead of parent.opener

<input type="button" onclick="javascript:window.opener.location.refresh();this.close();" name="closeBtn" value="Close" />
0
 
LVL 9

Expert Comment

by:brunoguimaraes
ID: 20057328
If that doesn't work, try reload() instead of refresh():

<input type="button" onclick="javascript:window.opener.location.reload();this.close();" name="closeBtn" value="Close" />
0
 
LVL 16

Author Comment

by:ellandrd
ID: 20057350
opener.parent.window.location.href worked.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question