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
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" />
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" />
ellandrdAuthor Commented:
opener.parent.window.location.href worked.
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.