I want to add an instance of a subform that initially doesn't appear and I am just wondering how to overcome the problem that appears in the JSConole that says,
xfa.form.form1.MainPageSF.CardB has no properties
1:XFA:form1[0]:#pageSet[0]:Page1[0]:AddB[0]:click
I'm not sure what is going on other than to guess that there are no properties because the subform can't be found. I have hidden subforms before and got them to appear but in this case I don't want some subforms to appear untill they are called for.
I'm not sure what to do.
1. Unhide the subform and make this your first instance.
2. Using the "_subform" notation to access the instance manager should work in this case.
instead of "Mysubform.instanceManager.addInstance()",
Use This: "_Mysubform.addInstance()";
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script