cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe form looping issue

Former Member
0 Kudos

Hi Experts,

I am using Java script. When i use below code

for (var i = 0; i < 2; i++){

xfa.host.messageBox( "Hi"+i);

}

Working fine. but i use

for (var i = 0; i < 2; i++){

xfa.host.messageBox( i );

}

It is not working....Please Tel what is the issue & how we solve?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for all

harman_shahi
Contributor
0 Kudos

Hi Mathi,

If you look at the definition of 'xfa.host.messageBox' method, it requires a STRING parameter, and you are trying to pass an INT, and thats why it is not working:

Here is a workaround for your issue:

xfa.host.messageBox(""+i);

hope this helps,

harman

Former Member
0 Kudos

Hi Harman,

I have dynamic table in my adobeform.Table name is Table2.when i process below code

xfa.resolveNode("data.subform[1].Table2.Row1.colkey").rawValue

always get first row key value in table . but i give with in loop

for (var i = 0; i < 2; i++){

xfa.resolveNode("data.subform[1].Table2.Row1\"i\".colkey").rawValue;

}

i didn't get any value...Please tel me how i get all rows values in that table?....

Thanks.

chintan_virani
Active Contributor
0 Kudos

Mathi,

As per my understanding the code should have been:-


for (var i = 0; i < 2; i++)
{
   xfa.resolveNode("data.subform[1].Table2.Row1["+i+]".colkey").rawValue;
}

Chintan

sankar_narayana
Active Participant
0 Kudos

Hi Guys,

Note: This is all dynamic.

I will try to put my question in this forum. Like I have a trouble of retrieving the value.

PurchaseSubform --> Data(Subform) --> Row1(Subform)

PurchaseSubform --> Data(Subform) --> Row2(Subform) --> Comments Text Field.

I'm repeating the Data Subform

But i'm not repeating the Row1 & Row2 Subforms.

How to read Comments field value in the Row2 Subform.

When i posted in SDN & Adobe Forums i could not get reply.

One guy from adobe forums suggested to keep too for loops means for loop inside a for loop will solve the issue. Can anyone from this group can solve my issue. This is bit urgent.

Helpful answer will be rewarded.

Edited by: Sankar Narayana on Jul 22, 2008 5:42 PM