Expand my Community achievements bar.

Converting less than symbol to < in for loop

Avatar

Former Community Member

I am trying to create a for loop inside of a javascript function by using the XML Source tab in LiveCycle.  When I do this a < symbol becomes &lt;. A <= starts causing major erros, and the text after becomes red and then blue (indicate key words).

I am wondering how do I create a for loop without these issues?

For instance the following will cause an error that will not let me leave the XML source tab:

     var x;

     for(x = 0; x <= 5; x++)

     {

          xfa.host.messageBox("test");

     }
Thanks,

1 Reply

Avatar

Level 7

try &lt;=

but can I ask why you are writing your script in the xml tab rather than the script editor?