?
Solved

showModalDialog call function on parent page

Posted on 2004-08-13
1
Medium Priority
?
610 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
1 Comment
 
LVL 63

Accepted Solution

by:
Zvonko earned 800 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
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…
Suggested Courses

839 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