var w2 = new Window ("dialog");
w2 .add ("button", undefined, "Button 2"); /// <= HERE
var w3 = new Window ("dialog");
w3 .add ("button", undefined, "Button 3");
myPrinter.onClick = function() {
w2.show();
}
w3.onClick = function() { /// <= AND HERE
w3.show();
}
w.show();
Hi, your code is not pointed Button2 ,
var button2 = w2 .add ("button", undefined, "Button 2");
set variable and
button2.onClick = function() {...}
OR
w2 .add ("button", undefined, "Button 2", {name: "Button 2"});
set name and call 'Button 2' element
w2['Button 2']onClick = function() {...}
thank you