Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access child window from parent window through javascript?

Suppose we open a popup through javascript when a link is clicked on parent window.

As everybody knows that parent window elements can be accessed from child window using the window.opener() function.

Is it possible to do exactly reverse ? Can parent window access the information about the child window ?

like image 574
Kshitij Jain Avatar asked Sep 19 '13 09:09

Kshitij Jain


1 Answers

You mean something like this:

a=window.open()
a.document.write("<div id='mydiv'>test</div>")
a.document.getElementById("mydiv")
like image 163
Arpit Agrawal Avatar answered Oct 03 '22 14:10

Arpit Agrawal