Is this what you are asking for?
Click a button in the first window, open a new second window (say to a=nwr page), add the new record in the second window and when that second page submits close the second window - all seamlessly.
If that is what you want it can be done but it has to be done in a vary particular way as script cannot close a window it did not open. So the script to orchestrate this has to be set up exclusively in the first window where the button initiating the action is.
Please confirm or clarify further.