I have a container , which contains three items
Radio bottom with two option A , B
One text item
One Browser Item
select option A , it should display Text item and hide Browser Item
select option B , it should display Browser Item and hide Text item
My From API works only for the first container item and not for the others
[font=Book Antiqua][size=2]What is wrong with my code?
Pls Advice
Thanks
Vin
[/size][/font][PHP]
function init()
{
IWEventRegistry.addItemHandler("/root_container/first_container/item_1","onItemChange", setValueBox();
}
function setValueBox()
{
alert("inside function ");
var children = IWDatacapture.getItem("/root_container/first_container/").getChildren();
for (var i = 0; i < children.length; i++)
{
var child = children
;
var category = child.getChildren();
var radioValue = category[0].getValue();
alert('radioValue' + category);
if (radioValue ==1)
{category[1].setVisible(true); }
if (radioValue ==0)
{category[2].setVisible(true);}
}
}
[/PHP]