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

New Here ,
Jun 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

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

TOPICS
JavaScript , PDF forms

Views

36

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

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

 

Sebastian

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

LATEST

Yes, that's the Chrome PDF plugin.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines