Accessing fields using parent.opener

I have a page that opens a child window that contains frames.  Within one of the frames, when the form is submitted, I would like to pass a value back to a hidden field held within the original parent window.

Is this the correct syntax?
parent.opener.window.document.all["hidReload"].value = "true";
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Michel PlungjanConnect With a Mentor IT ExpertCommented:

top.opener.document.forms[0].elements["hidReload"].value = "true";

ccboydAuthor Commented:
I am currently getting a JavaScript error:

 Line: 2212
 Char: 4
 Error: Object doesn't support this property or method
Michel PlungjanIT ExpertCommented:
opener IS a window

parent=top if there is no nested frameset
but you won't be able to do this if the opener url is on a different domain than the popup/frame url
ccboydAuthor Commented:
Great!  I just really needed some confirmation that I was heading in the right direction.

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.