Copy link to clipboard
Copied
There is a button. When the user presses the button, an alert with a description will appear. The alert has a checkbox. I want to make this button itself to disappear when the checkbox is checked by user.
Below is the code that doesn't work as expected.
var PINK = this.getField("PINK");
PINK.oMyCheckbox = {cMsg: "Hide this button",
bAfterValue: true
};
var PINKALERT = app.alert({cMsg: "TEST",
cTitle: "TEST",
nIcon: 3,
nType: 0,
oCheckbox: PINK.oMyCheckbox
});
if (PINK.oMyCheckboxf == false){PINK.display = display.hidden;};
There are two questions.
I tried variously, but I don't know how to write it.
Thankyou for anybody help.
Use this:
var PINK = this.getField("PINK");
PINK.oMyCheckbox = {cMsg: "Hide this button",
bAfterValue: true
};
var PINKALERT = app.alert({cMsg: "TEST",
cTitle: "TEST",
nIcon: 3,
nType: 0,
oCheckbox: PINK.oMyCheckbox
});
if (PINK.oMyCheckbox.bAfterValue == false){PINK.display = display.hidden;};
Copy link to clipboard
Copied
Use this:
var PINK = this.getField("PINK");
PINK.oMyCheckbox = {cMsg: "Hide this button",
bAfterValue: true
};
var PINKALERT = app.alert({cMsg: "TEST",
cTitle: "TEST",
nIcon: 3,
nType: 0,
oCheckbox: PINK.oMyCheckbox
});
if (PINK.oMyCheckbox.bAfterValue == false){PINK.display = display.hidden;};
Copy link to clipboard
Copied
It is perfect. I didn't notice this code at all. Thank you! I really want to say thank you. And I have to apologize for this late reply. I haven't had time to come back here for the past few days.