Skip to main content
Participating Frequently
March 29, 2018
Answered

Refresh control

  • March 29, 2018
  • 2 replies
  • 1929 views

I have a pdf where the user enters info and the last page does all the calculation.  The calculation is done in the fields, it involves averages.  It is slow because each time any information is entered all the fields on the last page recalulates.  I would like to switch off recalculation on that page until the user clicks a "calculate" button.  Is that possible?

Or even if I could switch off refresh for the entire document until a button is clicked.

I found this code but I am not sure where to put it or how to make it work.  Can anyone help?

Thanks in advance

{

        this.delay = true;

}

{

        this.delay = false;

}

This topic has been closed for replies.
Correct answer try67

Thanks to both.

Works.  Only thing I am left with is when I click the button to switch back on calculation I then have to enter information in any field to make the document refresh and calculate all fields.  Is there a sub command I could put in the this.calculate button that makes it calculate NOW.

Again, many thanks in advance, much appreciated


Yes: this.calculateNow();

2 replies

try67
Community Expert
Community Expert
March 29, 2018

Use the "calculate" property, instead.

Participating Frequently
March 29, 2018

Hi,

Thanks for your reply

Not sure what the calculate property is?

try67
Community Expert
Community Expert
March 29, 2018

Instead of "this.delay" use "this.calculate".

Bernd Alheit
Community Expert
Community Expert
March 29, 2018

You can use the calculations at the "calculate" button.

Participating Frequently
March 29, 2018

Would I then put all the calculations into the button?  There are a lot of cacluations in the fields involving mean average.  I would not know how to start this in javascript.  Perhaps I have not been clear, I need the fields on page 9 of my document or my whole document not to caculate until I press a button. Many thanks

Bernd Alheit
Community Expert
Community Expert
March 29, 2018

What calculations do you use?