How do I stop running a script when I hit cancel on dialog box
I'm trying to set up a script that will run a function if the user selects OK from the dialog box, but not if they hit cancel. The thing is the script runs regardless. So my question is how do I stop the script when they select cancel, or run the script when the hit ok?
var buttonCancel = g.add('button', undefined, 'Cancel');
var buttonOk = g.add('button', undefined, 'Ok');
