cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript not working in Adobe Reader

Former Member
0 Kudos

Hi All,

I have developed a Adobe Dynamic form, with javascript in it. When I look into the preview the javascript is working, but when I deploy and run it, the javascript is not working in the Adobe Reader.

I have:

Adobe Reader 7.0.9

and working nog NWDS SP18, MI also on SP18.

Does anyone know what the problem could be?

Thanks & Regards,

Chris Bogers

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Did you put the Form as Dynamic in the Designer. You can set this in the Tool -> Options.

Former Member
0 Kudos

Hi,

I’m facing the same problem, and need disparately to find a solution for this.

Changing putting Form as Dynamic in the Designer, didn’t solve the problem.

Simples Scenario:

- Create a simple TextField;

- Create two Simple Buttons;

- Assign to one of the buttons, a script to hide the TextField (TextField.presence = “invisivle”);

- Assign to other button, a script to show the TextField (TextField.presence = “visivle”);

Running the PDF in the PDF Preview, works perfectly, but running it in the browser or after downloading to local PC, the script to hide/show, doesn’t work.

Please advice.

Thanks

John

Former Member
0 Kudos

Hi,

To solve the problem, i just had this two lines of code to WDModifyView method:

IWDInteractiveForm aifForm = (IWDInteractiveForm)view.getElement("InteractiveForm1");

aifForm.setDynamicPDF(true);

Note: InteractiveForm1 is the ID of Interactive Form element in the View. Method setDynamicPDF is deprecated.

Regards

John

Former Member
0 Kudos

Hi,

I am sure that the "if" condition is not working properly for you right. I am also facing the same problem. the presence property should be working fine. I am also looking for a solution to this. Is there any setting that would enable client side scripting in ADS or somewhere else. Try removing the "if" condition and just put the presence properties and see what is happening.

Thanks,

Sreekanth Nadella.

Message was edited by:

Sreekanth Nadella

Former Member
0 Kudos

Hi,

Generally it works ....

Could you send me your java script and one more thing is it showing any error I mean in the alert message send me that also.

I am working on Pdf's with java script .

Thanks,

Lohi.

Former Member
0 Kudos

Hi Lohi,

The javascript I'm using:

if (xfa.event.newText == "Electriciteit") {

aansluitingVan.presence = "visible";

aansluitingNaar.presence = "visible";

tfWijziging.presence = "visible";

rtWijziging.presence = "visible";

} else {

aansluitingVan.presence = "invisible";

aansluitingNaar.presence = "invisible";

tfWijziging.presence = "invisible";

rtWijziging.presence = "invisible";

}

I have no javascript errors.

Only after deploying the application I see the following Adobe message: ReaderRights credential.

But the PDF is displaying correctly (only javascript is nog working).

But the javscript is working in the PDF Preview.

Thanks & Regards,

Chris Bogers

Former Member
0 Kudos

Hi Chris..

I am developing an adobe form where in have dropdown lists which are dependent on each other..

How do i populate data i n them and the requirement is that when i select a value in 1st dropdown dependent values should be shown in the dropdown below..

Can u tell me can i use Java script to do this. If yes .. how .. If no then please suggest smthng...

Thank You.

Former Member
0 Kudos

Hi Chris,

Check this thread

u can find sample scripts here

<a href="http://www.adobe.com/devnet/livecycle/designer_scripting_samples.html">http://www.adobe.com/devnet/livecycle/designer_scripting_samples.html</a>

regards

Sumit

Former Member
0 Kudos

Hi,

Does anybody has an answer to this question?

Thanks & Regards,

Chris Bogers