Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Next Available Text Box

Status
Not open for further replies.

Halliarse

IS-IT--Management
Jan 8, 2007
213
0
0
GB
Hi

I am VERY new to Acrobat and JavaScript so forgive me if this is simple!

At the bottom of my form I have 19 hidden text boxes called Action1, Action2 etc

When my user checks a check box, I want to be able to determine what the next available TextBox is, make it visible and populate it.

I'm using the following code but it's not working, so any assistance would be greatly accepted!

var sum = 0;
for ( i = 0; i < 20; i++ ) {
f = "Action" + ( i == 0? "" : i ) + "[0]";
if (getField( f ).valueAsString) {sum += 1;}
}
sum += 1
getField("Section" + sum).display=display.visible;
getField("Section" + sum).value="1a";
getField("Action" + sum).display=display.visible;
getField("Action" + sum).value="Any valid text";

Thanks

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top