cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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.

Former Member
0 Kudos

To add a new row you need to use the below code.

ROW_NAME.instanceManager.addInstance(i)

Where ROW_NAME is the name of the table row. In your code I suppose ROW is row name then what is BODY?

Thanks,

Aravind

Former Member
0 Kudos

Hi,

I got my problem solved. Thanks to all.

Thanks and regards,

Raka.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

You are saying script is written in Javascript. But in the error it says language is formcalc.

How can that happen?

Thanks,

Aravind

vaibhav_tiwari
Contributor
0 Kudos

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