Forum Moderators: open
So if I do this:
if(myVariable == yes) {
}
Then I want it to tell the text box to appear or display itself if myVariable will equal "yes" and when it equals "no" the text box won't be visible. How do I do that?
Thanks in advance!
if(myVariable == yes) {
// You'll need to toggle in case it's been made invisible
myTextBox._visible = true;
.......
}
else {
myTextBox._visible = false;
}
A shorter version, shortcut evaluation rocks:
myTextBox._visible = (myVariable == yes)?true:false;