Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Replicant Loop
LeeCharlebois
I know this has been posted to death, but I haven't been able to find an answer to my silly question. I'm sure I've just been looking at this far too long and it's a simple answer. Here's the chunk of code doing the loop:
[html]
var comments = IWDatacapture.getItem("/topic/comments/comments");
var count = comments.getChildren().length;
var i;
for(i=1; i<=count; i++){
var content = IWDatacapture.getItem("/topic/comments/comments
/content");
content.setReadOnly(true);
}
[/html]
So, that code is not working. If I replace the i in the loop with a 1 it works. There are two replicants in the comments container.
topic - root container
comments - tab
comments - replicant container
content - textarea
env - TS 6.7.1 SP1
Find more posts tagged with
Comments
nipper
What is not working ? Nothing getting set RO ? Any errors ? Can you put some alert statements to debug ? Do you have JS error notification turned on for your browser ?
LeeCharlebois
I got it. Told you it was a silly question...
[html]
var comments = IWDatacapture.getItem("/topic/comments/comments");
var count = comments.getChildren().length;
var i;
for(i=1; i<=count; i++){
var content = IWDatacapture.getItem("/topic/comments/comments[" + i + "]/content");
content.setReadOnly(true);
}
[/html]