I have PopUp window which goes to upload.jsp, which upload the file to directory.
The uploading logic is written in upload.jsp. My problem is I wanted get the saved path to parent popup window textfield.
I have PopUp window which goes to upload.jsp, which upload the file to directory.
The uploading logic is written in upload.jsp. My problem is I wanted get the saved path to parent popup window textfield.
The child window has a property,
opener
, which refers to the window that opened it. Provided they're both from the same origin, the child can access global variables on the parent like this:That means it can access the parent window's document as
opener.document
, and so can useopener.document.getElementById
oropener.document.querySelector
to get at elements in the parent window.Example:
Parent page:
Popup page: