T
Tag
OK, my problem is that im including a check that goes through a
repeating section and makes sure only one of these sections has a
checkbox titled primary contact selected, and if it finds more than
one, to reset the others to no
var nodeSelTextContact = XDocument.DOM.selectNodes("//my:Contact");
var count = 0;
var selectedNode;
for(var i=0; i< nodeSelTextContact.length;i++)
{
if(nodeSelTextContact.selectSingleNode("myrimaryContact").text
== "1")
{
selectedNode =
nodeSelTextContact.selectSingleNode("myrimaryContact");
count++;
}
if(count >= 1)
{
for(var k=0; k < nodeSelTextContact.length; k++)
{
nodeSelTextContact[k].selectSingleNode("myrimaryContact").text
== "2";
}
selectedNode.text = "1";
return;
}
any idea? Whats happening right now, is it detects the yes, and goes to
the second loop, but doesnt set the values to 2
repeating section and makes sure only one of these sections has a
checkbox titled primary contact selected, and if it finds more than
one, to reset the others to no
var nodeSelTextContact = XDocument.DOM.selectNodes("//my:Contact");
var count = 0;
var selectedNode;
for(var i=0; i< nodeSelTextContact.length;i++)
{
if(nodeSelTextContact.selectSingleNode("myrimaryContact").text
== "1")
{
selectedNode =
nodeSelTextContact.selectSingleNode("myrimaryContact");
count++;
}
if(count >= 1)
{
for(var k=0; k < nodeSelTextContact.length; k++)
{
nodeSelTextContact[k].selectSingleNode("myrimaryContact").text
== "2";
}
selectedNode.text = "1";
return;
}
any idea? Whats happening right now, is it detects the yes, and goes to
the second loop, but doesnt set the values to 2