I am not sure if I got the code correct but I made the following change and it still reads the same error
function CTRL6_5::OnClick(eventObj)
{
var dataFieldsChildren
var dataFieldsNode
//child is field1
dataFieldsChildren=XDocument.DOM.selectNodes("/my:myFields/my:group1/my:group2/my:field1");
//parent is group2
dataFieldsNode=XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2");
for(i=0;i<dataFieldsChildren.length;i++)
{
dataFieldsNode.removeChild(dataFieldsChildren(i));
}
}
Thanks for your patience.
Nik