Expand my Community achievements bar.

How to reference objects with same name?

Avatar

Level 2

Probably another easy one, but again, couldn't find the answer in old discussions...

I have some objects with the same name on my form. Designer has made them unique by making an array out of them...object[0], object[1], object[2] etc. How can I reference the individual objects in javascript?  I tried the obvious by referencing them as an array, but to no avail.  I suppose it'd be just as easy, if not better, to just have unique names, but in this case, the objects are related and having them in an array would be handy.

1 Reply

Avatar

Level 10

You can try like below.

     var oObject = xfa.resolveNode("Object[1]");

     xfa.host.messageBox("" + oObject.rawValue);

Thanks

Srini