How to access the value from popup window

I have a main window and a button to launch a popup edit box to add/edit a record from the grid in my main window

I don’t have iframe. I am attaching a HTML string which is generated dynamically similar to the

below. If I type something I want to show when I click button show. how I can access, name & lastname once I type something in the popup.

Also how I can transfer the record to the grid in the myWindow?

First Name:
Last Name:
<input id=“b1” type=“button” value=“Show Input” onclick="showInputl();>

function createPopup(){

     w1 = myWindow.createWindow(“w1”, 200, 120, 600, 300);

     w1.attachObject(‘editForm’, true);


function showInput(){




as you don’t use iframes inside window, you can use the common js appoach to get element value:

function showInput(){