Hi ,
I have two dropdown s with some values i want to compare two dropdowns values. I have java script on the click event of the button it will compare values of drodpowns. If any redundant/duplicate value found then those values need to be deleted from the second dropdown.
function dummy()
{
var dd1=xfa.resolveNode(form1.Page1.State.somExpression); //path to first dropdown
var dd2 = xfa.resolveNode(form1.Page1.Dummy.somExpression); //path to second dropdown
var i =0;
var j=0;
if(State.length!= 0)//State is first dropdown
{
for (;i<dd1.length;i++)
{
for(;j<dd2.length;j++)
{
if(dd1.getDisplayItem(i)==dd2.getDisplayItem(j))
{
dd2.deleteItem(j); //deleting the value from second dropdown.
break;
}
else
{
continue;
}
}
}
}
}
But this function is not working properly it is taking first value of the DD1 and comapring with all the values of DD2 and coming out of the loop .There are other values in the DD1.So for that comapring is not happening.
Please help me !!!
Thanks in advance,
Bharathi.