I have the following script on a custom button to dynamically create table rows.
MeetingMinutes.LogoControls.ActionSubformA.ActionItemAddSubform.AddActionRowButton1::click - (JavaScript, client)
var oActionSubformA = MeetingMinutes.LogoControls.resolveNode("ActionSubformA[" + this.parent.parent.index + "]");
this.resolveNode('ActionSubformA.Table1._Row2').addInstance(1);
oActionSubformA.Table1.HeaderA.presence = "visible";
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
I am getting the following JavaScript console error:
oActionSubform is null
3:XFA:MeetingMinutes[0]:LogoControls[0]:ActionSubformA[0]:Table1[0]:Row2[1]:DeleteActionItem[0]:initialize
Any idea what is causing the error?
Solved! Go to Solution.
Views
Replies
Total Likes
Maybe a typo.
Everywhere you use the name ActionSubformA but in this script only ActionSubform.
Views
Replies
Total Likes
Hi,
the error message has nothing to do with the script in the click event of AddActionRowButton1.
There must be another script in the initialize event of the DeleteActionItem button.
Views
Replies
Total Likes
Hi radzmar,
This is the script in the DeleteActionItem initialize event:
MeetingMinutes.LogoControls.ActionSubformA.Table1.Row2.DeleteActionItem::initialize - (JavaScript, client)
var oActionSubform = MeetingMinutes.LogoControls.resolveNode("ActionSubform[" + this.parent.parent.parent.index + "]");
if(this.parent.instanceManager.count>0){
oActionSubform.TopicGroupA.Table1.HeaderA.presence = "visible";
}
Views
Replies
Total Likes
Maybe a typo.
Everywhere you use the name ActionSubformA but in this script only ActionSubform.
Views
Replies
Total Likes
radzmar,
Thanks for your help. It was a typo. Can't belive I didn't see that. Thanks again!
-Don
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies