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
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

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
In my daily work (mainly using, I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

710 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