The parent window opens a child to enter a set of parameters and the "Start" button. By pressing the "Start" button, you must close the child window and return the entered parameters to the parent.

Prompt the implementation, because I can not understand where the variables of the child window are tied to its identifier, i.e. I open the child as:

var menu=window.open("my_url","NEW",options); 

I am trying to find in the descendants of the menu variable what was in the child window - I did not find it.

    2 answers 2

    You open another from one window under the name NEW. If you need to transfer data to the main window from this NEW, then you can run the script of the parent window, for example

     window.opener.dalee(a); // запускает в родительском окне функцию dalee и передает ей на вход переменную - a 
    • here it is! - deivan_

    Read here - Transfer data between forms on different pages using javascript .

    • Not that ... - deivan_