0

Before i begin, my question is NOT about embedding a PDF on a website, nor making it downloaded.

I have a PDF that contains a form, and javascript in the PDF that should calculate the value of a certain field on the fly. Except that it doesn't; well, it does but only when changing the value of a field...

I have a field that contains a date, and i want another field to calculate the number of days elapsed since that date. This part works. While it works when i change the value of "date" (calculation is made and result is shown as expected), i want the number of days value to update automatically every day, not just when i change the date.

The machine i use to edit the PDF has Adobe Acrobat X Pro, but the system that displays the PDF only has Adobe Acrobat Reader 9. The Reader is embedded in a kiosk-like application, making me unsure whether the PDF is reloaded at regular intervals by the application, or remains in memory and just hidden.

ThaNerd
  • 128
  • 1
  • 2
  • 7
  • Can we see the code? :) – CoBolt Apr 22 '13 at 07:44
  • `var parts = getField("LastAccidentDate").value.match(/(\d+)/g); var lastAccident = new Date(parts[2], parts[1]-1, parts[0]); // months are 0-based var today = new Date(); //var lastAccident = new Date(2013, 1, 6); //Attention! month is zero-based! 0=January, 1=february,... DaysWithoutAccident = parseInt((today.getTime()-lastAccident.getTime())/(24*3600*1000)) event.value=DaysWithoutAccident-1; ` – ThaNerd Apr 23 '13 at 09:42

0 Answers0