Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

For Loop not acting correctly...

$
0
0

Hi everyone,

 

I have this For Loop in JavaScript which is not working correctly and I really have no idea why it is acting like so... I don't if anyone has already encountered this issue and I'd like to know if there's a fix for this or what am I doing wrong...

 

I have a normal for until the count is done like this -> for (var c = 0; c < frmResourceReq.instanceManager.count; c++){}

If I put this loop with only a messageBox it will do it right, so if the count is 1, it will do it once, if the count is 2 it will do it twice...

 

The loop with the actual code is not acting like so.. if the count is 1, it will do it once, but if the count is 2 it will do it once also...

At 1 point it was acting weird so I decided to make the condition with  'c <= frmResourceReq.instanceManager.count'

Now if the count is 1, it is not working because it crashes once it execute it the second time, but if I have a count of 2 or 3 it will execute the right number of times...

 

Does anyone have any idea what is creating this issue, seems like I really can't figure it out.

 

Thanks for your time.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>