Monday, June 3, 2024
66
rated 0 times [  70] [ 4]  / answers: 1 / hits: 72930  / 14 Years ago, thu, february 3, 2011, 12:00:00

I am opening a modal popup window. Then I access a parent window textbox and other attributes using window.opener. It is working fine in firefox but not in IE8. It gives error 'window.opener is null'. How can I access parent window attributes in child window which works in both browsers.


More From » window.opener

 Answers
4

You can pass arguments to showModalDialog function. Simply pass window object as an argument.



window.showModalDialog(theURL, window);


Yo can access the arguments from the modal window using dialogArguments. See: http://msdn.microsoft.com/en-us/library/ms533723%28VS.85%29.aspx



var openerWindow = window.dialogArguments;

[#93923] Tuesday, February 1, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marinal

Total Points: 655
Total Questions: 99
Total Answers: 99

Location: Svalbard and Jan Mayen
Member since Sun, Sep 25, 2022
2 Years ago
;