Johnson, I would not worry about it too much, for we all adhered to the ChaCha-design principle at a certain stage (Cluelessly Horsing Around, Creating Hopeless Applications). But, with a bit of luck, determination and some help, you’ll get past that.
Try this:
export function button2_click(event) {
if ($w("#box19").hidden) {
$w("#box19").show();
$w("#box28").hide();
}
else {
$w("#box19").hide();
$w("#box28").show();
}
}
(I didn’t test this, but it should be OK or close).
And another thing: don’t use button_2, box19, etc. If you look at this code again after a year, you will have no clue whatsoever what they mean. It’s better to give them speaking names, like “btnToggle” , “boxWhatever”, and so forth.