Solved

showModalDialog call function on parent page

Posted on 2004-08-13
1
574 Views
Last Modified: 2012-06-27
i open a modal dialog and i need to call a function on the parent page.  I don't know how to access the parent window though.  I've tried several things.  opener is undefined.  self.parent, window.parent, parent, etc don't work.  Its a word processor.  The modal dialog get values from the user for a dynamic table and then the function i'm trying to call would insert the table into the editor.  i'd much rather be able to call the function from the modal dialog, but if its not possible i need a way to pass the values from the modal dialog back to the parent window.  any ideas??
0
Comment
Question by:tricos1
[X]
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
1 Comment
 
LVL 63

Accepted Solution

by:
Zvonko earned 200 total points
ID: 11793290
Look here:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/showmodaldialog.asp

Therin you see that the second parameter is the place where you pass the argument or argument array to modal dialog.
Modal dialog can access then the passed parameters trugh the predefined property:
window.dialogArguments

The passed argument to the modal dialog can be also the calling parent window reference: window
So you can access anything on opener window trough dialogArguments if the argument was: window
Now you can directly set the response vars in opener window or pass some results trough the returnValue property.


0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

729 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