Solved

Accessing fields using parent.opener

Posted on 2004-10-12
5
3,710 Views
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";
0
Comment
Question by:ccboyd
  • 2
  • 2
5 Comments
 

Author Comment

by:ccboyd
ID: 12287245
I am currently getting a JavaScript error:

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

Accepted Solution

by:
Michel Plungjan earned 50 total points
ID: 12287282

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


0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 12287290
opener IS a window

parent=top if there is no nested frameset
0
 
LVL 33

Expert Comment

by:knightEknight
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
0
 

Author Comment

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

Thanks.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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