cancel
Showing results for 
Search instead for 
Did you mean: 

JavaScript not working

Former Member
0 Kudos

On the Click event of a Button, I have written some JavaScript code.

But when i click on the Button, some part of the code works while the remaining does not.

There are no syntax errors also.

I am using button which is under the 'Standard' section of the Library.

Please help.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

the field which i was accessing in the javascript was actually not on the layout even though it was showing up during design.

But in Preview it was not there.

Former Member
0 Kudos

Hi,

You can check for the JavaScript errors in the Adobe Form. This can be done like open the saved form in Adobe Reader and press Control+J keyboard entries then the JavaScript Debug Console will be opened and if any errors are present then it shows up all the error messages.

If you want to show errors if present always then open the Adobe Reader and goto Edit->Preferences and there select Javascript and in the Right panel under JavaScript Debugger select "Show Console on Errors and Messages".

This will help you in identifying the errors if any present in the form.

Regards

Pradeep Goli

Former Member
0 Kudos

Thanks.

But i have cross checked all these possibilities.

Former Member
0 Kudos

Hi,

Just see the PDF preview of ur form , it will show the errors in ur script , if any..

Former Member
0 Kudos

There are two reasons why Javascript that you have written that may not work:

a) Syntax errors in your Javascript (look carefully, we always miss it)

b) Runtime errors -

i) You may have changed the name of the field but still referring to the old field

ii) Added a new subform but still referring to the old field

iii) Using xfa.resolve and that particular data node has been hardcoded i.e. within strings but in reality that node doesn't exist at all

Regards,

Subramanian V.