When I am trying to access an element of my Parent window from a Pop-up window, I am getting window.opener
as undefined.
var opener = window.ope
You can use the showModalDialog
function and pass arguments to it, if the browser used is IE. Simply pass window
object as an argument.
After that you can access the arguments from the modal window using dialogArguments
.
More details can be found in the documentation here: http://msdn.microsoft.com/en-us/library/ms533723%28VS.85%29.aspx
Example of retrieve:
window.showModalDialog(theURL, window);
//in the modal dialog you can use this to retrieve the window.
var openerWindow = window.dialogArguments;