-
What’s wrong with my script?
Hi guys. I’m new to javascripting. I just can’t figure why it doesn’t alert “Hello World” when I click OK. It’s probably right in face but i just can’t see it.
var myWindow=new Window(“dialog”,”My Window”);
myWindow.okButton = myWindow.add(“button”);
myWindow.okButton.text=”OK”;
myWindow.cancelButton = myWindow.add(“button”);
myWindow.cancelButton.text=”Cancel”;
myWindow.show();myWindow.okButton.onClick = function () {
alert (“Hello world”);
myWindow.close();
}thanks