Demo: make Input Box disappear using JavaScript
Here's what you need in Global JavaScript:
function timer() {
var time = ggbApplet.getValue("time");
// select hidden Input Box (to make sure text isn't lost from InputBox1
ggbApplet.evalCommand('SelectObjects(InputBox2)');
// increment time
ggbApplet.setValue("time", time + 1);
// make sure InputBox1 has focus again
ggbApplet.evalCommand('SelectObjects(InputBox1)');
// stop timer after 35 seconds or so
if (time < 35) {
setTimeout(timer, 1000);
}
}
function ggbOnInit() {
timer();
}