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)
getChildren()
Mich
Hi, trying to set a text box within a replicant to invisible and set the value later when the user saves the DCR. Keep getting a null or not an object error with the following code. Any ideas would be appreciated, thanks Mich
var pastCampaign;
pastCampaign = IWDatacapture.getItem("/replicant/pastValue/");
alert(pastCampaign);
pastCampaign.setVisible(false);
pastCampaign.setReadOnly(true);
Find more posts tagged with
Comments
Migrateduser
getChildren returns null if there is no instance of the replicant, not sure if that is what you are seeing. Or maybe the trailing / on pastValue is not allowed?
This is what I do (Data is a container, Sections is the replicant, SectionBody is a textarea within the replicant).
if ( IWDatacapture.getItem( "/Data/Sections" ).getChildren() != null )
{
for( i = 0 ; i < IWDatacapture.getItem( "/Data/Sections" ).getChildren().length ; i++ )
{
var index = i + 1;
// do something with "/Data/Sections[" + index + "]/SectionBody";
}
}
Mich
Thanks for your code. I am still getting:
IWDatacapture.getItem( "/relatedReplicant" ).getChildren() is null or not an object even when I put some text in the text box and there is one replicant. Not sure what to do next cheers Mich
Migrateduser
Can you post or email your DCT?