Skip to main content
Participating Frequently
August 6, 2024
Question

Javascript not updating in web browser?

  • August 6, 2024
  • 1 reply
  • 259 views

I've got a code that basically calls today's date and adds two days to that date.  It basically makes an expiration date for a form.  

 

var d = new Date();
d.setDate(d.getDate()+2);
this.getField("Expires").value = "Expires" + util.printd("dd mmm yy", d);

 

The problem is that the script updates in Acrobat fine, but on Chrome/Edge that our company posts to, the script is defaulting to the date the file was posted.  Can this be fixed by changing the script or does the file always need to be downloaded for it to work?

 

Thanks.

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
August 6, 2024

You will have to download the file for it to work, because the script will not work in most browsers.