Skip to Content
author's profile photo Former Member
Former Member

Getting javascript error while opening offline adobe forms sent via email.

ERROR: script failed(language is formcalc,context is xfa[0].form[0].data[0].FORM[0].

script = BODY.instanceManager.addInstance(1);

Error:accessor "BODY.instanceManager.addInstance(1)" is unknown.

I have written the code in Javascript and run at client.

Below is my sample code:

var nlength = ROW.BODY.nodes.length;

var nrow = 0;

for(var nCount=0;nCount<nlength;nCount++)

{nrow = nrow + 1;}

if (nrow == 7)

xfa.host.messageBox("Maximum allowable rows is 7","Warning",3);

else

{ROW.BODY.instanceManager.addInstance(1);

xfa.form.recalculate(1);

xfa.host.messageBox("Row added");}

Rows are getting added.

I am not getting the problem,Pls help me.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2011 at 04:58 AM

    I know that.But i have checked it a few times and the language is javascript only.

    I have checked even sdn before posting it.I have found a thread on this issue.

    I have tried to solve with that.But i am unable to solve the problem.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello

      At first change your scripting language to JavaScript.

      or

      Select the email submit button from library and fill email address and email subject field in object tab.

      Edited by: mahato123 on Jul 7, 2011 8:08 AM

  • Posted on Jul 06, 2011 at 04:45 AM

    Is the form built in Adobe Live Cycle Designer and you are using Acrobat Pro to open it in offline mode?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 06, 2011 at 05:36 AM

    Yes,the form is buit in adobe livecycle designer and it opens in adobe reader.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 10:34 AM

    Hello all,

    Thanks for your replies.

    I have made Show -> click and Language -> Javascript and Run at -> Client for the button 'ADD'(this button inserts line) and in the blank space i have written the code as stated above.

    Then,i have activated the form.

    As per the Submit button it is working fine...

    I am new to adobe forms and i have done a self-training for this..

    Maybe I am doing something wrong...

    Pls help.

    Thanks and regards,

    Raka.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.