Skip to main content
Participant
June 30, 2022
Question

Combobox list change (javascript) doesn't work in early versions

  • June 30, 2022
  • 1 reply
  • 396 views

I´m trying to modify the list of a combobox using the following javascript code:

this.getField('myfield').setItems([["one", "1"],["two", "2"]]);

The code works as expected in recent versions of acrobat readers (15 or 20), but does nothing in older ones such as 8 (app.viewerVersion). This 8 version is the one installed by default inside Edge web browser at the company I work.

 

I also tyied to modify the list by erasing and adding entries but the result was the same: no errors but nothing changed.

 

Is there any known workaround to make it work in every environment?

 

Thanks in advance.

Sebastian Lorenzo

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 30, 2022

Acrobat 8 is extremely old and not compatible with any current OS or browser (including Edge).

 

The code by itself should work fine in that version, though.

Participant
July 1, 2022

The variable app.viewerType returns "pdfium" when opened in the browser, I think the problem is that is not an adobe product.

 

Sebastian

try67
Community Expert
Community Expert
July 1, 2022

Yes, that's the Chrome PDF plugin.