How to transfer data between two windows?

Hello,

I created a window “A”, it contains an input field and a button.
I created a window “B”, it contains an input field

How to write in the input field of window “B” the content of the input field of window “A”, when I click the button?

In advance thank you

Hello
You can try the next approach:

formData1 = [ {type: "settings", position: "label-left", labelWidth: 50, inputWidth: 150}, {type: "input", name: "inp1"}, {type: "button", name: "btn1", value: "OK"} ]; formData2 = [ {type: "settings", position: "label-left", labelWidth: 50, inputWidth: 150}, {type: "input", name: "inp2"} ]; dhxWins = new dhtmlXWindows(); dhxWins.enableAutoViewport(false); dhxWins.attachViewportTo("vp"); w2 = dhxWins.createWindow("w2", 310, 10, 200, 200); w1 = dhxWins.createWindow("w1", 10, 10, 200, 200); myForm1 = w1.attachForm(formData1); myForm2 = w2.attachForm(formData2); myForm1.attachEvent("onButtonClick", function(name){ if(name == "btn1"){ var val = myForm1.getItemValue("inp1"); myForm2.setItemValue("inp2", val); } });