Skip to main content
July 9, 2022
Answered

Javascript action on button not working in reader mobile

  • July 9, 2022
  • 1 reply
  • 563 views

I have a proceedures checklist using checkboxes, most of which are required. At the end of the list i placed a button to verify that all required checkboxes were checked. It works great on PC but nothing happens on android. I am SO NEW to java and its awe-inspiring powers and would love to get this simple feature working...I'm sure I'm just missing something blatantly obvious to experts...

 

The button triggers on Mouse Up

This is the script to run:

var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if (f.type!="button" && f.required ) {
if (f.valueAsString==f.defaultValue) emptyFields.push(f.name);
}
}
if (emptyFields.length>0) {
app.alert("Please complete the following pre-trip checks:\n\n" + emptyFields.join("\n"));
}

This topic has been closed for replies.
Correct answer S_S

Hello Jesse,

 

I hope you are doing well. I am sorry for the trouble.

 

Running javascript on Acrobat Reader is currently available only on the desktop version and not on mobile devices.

 

I suggest you fill the feedback form so that it reaches to our developer team for them to look into it and implement it in the upcoming updates.

Link: Share your feedback on Acrobat DC (uservoice.com)

 

Thanks,

Souvik.

1 reply

S_S
Community Manager
S_SCommunity ManagerCorrect answer
Community Manager
July 11, 2022

Hello Jesse,

 

I hope you are doing well. I am sorry for the trouble.

 

Running javascript on Acrobat Reader is currently available only on the desktop version and not on mobile devices.

 

I suggest you fill the feedback form so that it reaches to our developer team for them to look into it and implement it in the upcoming updates.

Link: Share your feedback on Acrobat DC (uservoice.com)

 

Thanks,

Souvik.