Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Fetching a replicants length dynamically
Antharix
Hello ,
I am trying to fetch the length of a replicant (with max=1000) dynamically using the javascript. I am unable to access the replicant object without specifying the replicant index. I can iterate form 1 to replicant's maxlength to fetch the elements in the replicant. But the point is, the loop executes n number of times even if only 2,4 or 10 instances of the replicant are present and this is resulting in malfunctioning of the FormAPI script.
Kindly advice.
Thanks in advance
Ananda
Find more posts tagged with
Comments
Adam Stoller
Perhaps you can start off with:
A) Telling us which version of TeamSite you're using (including service packs and patches applied)
Showing us the code you've played with thus far that fails to work for you - preferably with at least a snippet (if not the whole) of the DCT in question.
For instance - are you using the IWItem.getChildren() ? If not, how are you attempting to determine the size of the replicant or container?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
Especially with the new FormAPI 1.1 IW's just introduced, Ghoti's right -- you should specify more information.
Even so, you should be able to:
var count =
IWItem
.getChildren().length;
alert(count);
... within your FormAPI. The alert is only there to validate that the first line is good code. I'm not 100% sure of line 1, but I don't think you'll have to play with that code too much to get it.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP1 on W2K
(3) TS 5.5.2 SP2 on Win2K