Hi all ,
I got a table , where in the 1st row of the table there is a CheckBox.Below that there are two columns.If the user clicks the checkbox then the columns below that checkboxes should become required at the runtime.I have tried the onchange event for the check box ; it throws some error and even some weird kind of errors come when I use the onClick event . I got confused , if the user checks and unchecks the checkbox for the 1st time then notthing has occured but when the user does for it for the 2nd time then it shows those fields as required , out of curiosity i also changed the condition for the onClick event but the same result is coming against the normal values.
For onChange event :
form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharges::change - (JavaScript, client)
var newVal = this.boundItem(xfa.event.newText);
if(newVal == 0)
{
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1").validate.nullTest = "disabled";
}
else
{
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1").validate.nullTest = "error";
}
For onClick event :
form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharges::click - (JavaScript, client)
var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharges").rawValue;
if(a == 1)
{
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_L1_1").validate.nullTest = "error";
}
if(a == 0)
{
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_L1_1").validate.nullTest = "disabled";
}
I am totally confused . Please help.