How do I show/hide multiple text fields and buttons

I have multiple text fields and a button that I'd like to have visible when I click a button, then be hidden after ten seconds. Example: textfield1, textfield2, button1 would show when <select> button is clicked and be visible for ten seconds. Then all three would be hidden until <select> button is clicked again.

I found this script that kinda sorta works but for only one field or button. This script triggers on a date. But I'd like to trigger it with a button click, not on a specific date. I'd like to to apply it to multiple fields and button(s). Is that possible? Would someone mind helping me out with getting it done?

if (util.printd("mm-dd-yyyy",new Date())=="01-02-2014") {
var timeout = app.setTimeOut("this.getField(\"TextField1\").display=display.hi
dden;", 10000);
} else this.getField("TextField1").display=display.hidden;

Joel Browne

Voted Best Answer

If you use hierarchical field naming for a group of fields that you want to control (e.g.,, group1.address,, the script could be something like:

var f = getField("group1");
f.display = display.visible;
var to1 = app.setTimeOut("f.display = display.hidden;", 10000);

By George Johnson   

Please specify a reason: