Accessing fields using parent.opener

Posted on 2004-10-12
Last Modified: 2012-05-05
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";
Question by:ccboyd
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Author Comment

ID: 12287245
I am currently getting a JavaScript error:

 Line: 2212
 Char: 4
 Error: Object doesn't support this property or method
LVL 75

Accepted Solution

Michel Plungjan earned 50 total points
ID: 12287282

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

LVL 75

Expert Comment

by:Michel Plungjan
ID: 12287290
opener IS a window

parent=top if there is no nested frameset
LVL 33

Expert Comment

ID: 12287482
but you won't be able to do this if the opener url is on a different domain than the popup/frame url

Author Comment

ID: 12287786
Great!  I just really needed some confirmation that I was heading in the right direction.


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

726 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