refresh parent window from child window close button

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.
LVL 16
ellandrdAsked:
Who is Participating?
 
brunoguimaraesConnect With a Mentor Commented:
Try window.opener instead of parent.opener

<input type="button" onclick="javascript:window.opener.location.refresh();this.close();" name="closeBtn" value="Close" />
0
 
brunoguimaraesCommented:
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
 
ellandrdAuthor Commented:
opener.parent.window.location.href worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.