The first line doesn't make sense. What are you trying to do there?
You can do this by making the timeout script a little more complicated. Try this:
var timeout = app.setTimeOut("if(this.getField(\"Text16\").value == \"\") this.getField(\"Text16\").display=display.hidden;", 15000);
And as Try says, the first line code (the if) doesn't do anything, you can delete it.
But now, I would like to show the field and if I make a selection from the drop down it would stay visible. Keeping the timer command, of course, it would go hidden if the drop down field was blank or on Reset after the allotted time. I played around with a bit of show/hide coding but this time I can't figure it out.
I tried the script Thom provided and it worked (somewhat). The field stayed visible after I made a selection from the drop down. But, not on Reset or clear. It remained visible. I'd like the field to go hidden on reset or clear or blank like it does with the timer script.
What I'm trying to do is, perform a calculation that this drop down is a part of at times (when needed). If I need it I select to show it and when I don't I hide it because I have too many fields and hiding it makes room because I don't need it.
Thom, thanks for trying to help. The code you provided kinda works but if I make a selection and reset the field the field stays visible. And also when (after) I make a selection and clear the field it still stays visible. It should go hidden.
The script I provided does exactly what you asked. Changing the visibility for other actions is a different issue. You've got a somewhat complicated process here.
You do an enormous amount of PDF scripting. And have been for a very long time now. You really aught to have learned more about scripting than you have. I would suggest you do just that. Spend some time and actually learn about this. Or hire someone. You do enough of this that it would be worthwhile.
I really haven't done an enormous amount of scripting. Perhaps a bit of features to a field or two. Getting a field to do this or that but I've only managed to complete 3 different projects. I wouldn't say that's an enormous amount of scripting.
Anyway, thank you for your help. You're right. The script you provided does work. All the best to all you guys here. I hope a happy and prosperous New Year.