URGENT! Access parent fields from modal dialog

Posted on 2004-08-03
Last Modified: 2008-02-01

I have a modal dialog containing an iframe containing a page.

From the page that is within the iframe that is within the dialog I want to reference / set fields on the window that opened the dialog.

I normally use

opener.document.all.frmFieldName.value = myValue;

but this doesn't work, is there a complication with dialog's or the fact that the dialog contains an iframe.
Question by:Plucka

Accepted Solution

Michael_Cicogna earned 500 total points
ID: 11712793

I think there is no other way then  passing the opener window as dialogparameter.

window.showModalDialog("modalurl.html", window);

and in your popup the field window.dialogArguments contains your opener window

LVL 18

Author Comment

ID: 11712872
That is brilliant! I tried everything, but this worked perfectly first time.


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sums of coloumns in html/java 15 68
Jquey and footrable 2 36
Don't understand jquery promises 6 38
is this a cms? 8 36
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now