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.

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";

}

Does anyone know what the problem could be?

Thanks & Regards,

Chris Bogers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chris,

your adobe form must be generates as dynamic. I assume you create an adobe form in WebDynpro Java. In method wdDoModifyView there must be code:

  if(firstTime) {
    IWDInteractiveForm iForm = (IWDInteractiveForm)view.getElement("YOUR_FORM");
    iForm.setDynamicPDF(true);
  }

where "YOUR_FORM" is the ID of your InterActiveForm UI element (probably "InteractiveForm1").

In Adobe LiveCycle Designer 7.1 you can discover whether your adobe form was created as dynamic. Open your created pdf file in LiveCycle Designer. Menu File -> Form Properties -> tab Compatibility, Form Type. There must be Acrobat 7.x <b>Dynamic</b> PDF Form File.

Menu Tools->Options->Document Handling dont't have any influence how adobe form is created by ADS

Regards

Michal

Answers (1)

Answers (1)

krishanu_biswas
Active Participant
0 Kudos

Hello Chris Bogers,

Have you really created a dynamic form ? How did you create a dynamic form ? It has to be through the InteractiveForm UI element interacface and you must call setDynamic(true) on that. Did you do so ?

If you are sure that this is a dynamic form then check with putting some alert boxes before or after the script if the control is actually coming inside or not.

Best Regards,

Krish

Former Member
0 Kudos

InteractiveForm UI element? Where can I find this?

Thanks & Regards,

Chris

Former Member
0 Kudos

I changed the the form like this:

Tools->Options->Document Handling

Changed Default File Type of New Forms to dynamic.

Chris