# Expire date for training provided as HTML5

**URL:** <https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715>\
**Category:** ActivePresenter\
**Created:** [August 9, 2023, 11:33am UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715 "2023-08-09T11:33:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![starter-wbt](https://talk.atomisystems.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@starter-wbt](https://talk.atomisystems.com/u/starter-wbt)\
**Post date:** [August 9, 2023, 11:33am UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715/1 "2023-08-09T11:33:05Z")

</div>

We are planning to deliver a training as HTML5 to customers.  
The agreement is that they could use it for X months.

Is there a way to add this check to the HTML5 generate by Active Presenter (e.g. by a script executed on startup to show a message and finish the presentation after a certain date)?

---

<div class="post-metadata">

**Author:** ![Hang](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/hang/32/865_2.png) [@Hang](https://talk.atomisystems.com/u/Hang)\
**Post date:** [August 10, 2023, 7:14am UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715/2 "2023-08-10T07:14:10Z")

</div>

Hi,

For your information, HTML5 only runs on the client-side; therefore, it’s uncertain if adding the check here would be effective. For example, learners can pass it by adjusting the date on their computers. To establish certainty, you need to perform the check on the server-side.

In case you still wish to implement it using HTML5, please refer to the project below. All the steps required are included in the slide.

[expiry date.approj](https://talk.atomisystems.com/uploads/short-url/xtF0wGjbyogDHo2asNQEciiuXqt.approj) (564 KB)

Best regards,  
Hang

---

<div class="post-metadata">

**Author:** ![Denilson\_Reis](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/denilson_reis/32/2636_2.png) [@Denilson\_Reis](https://talk.atomisystems.com/u/Denilson_Reis)\
**Post date:** [August 13, 2023, 6:41pm UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715/3 "2023-08-13T18:41:39Z")

</div>

Hang, can you please describe here the complete code for this example?

---

<div class="post-metadata">

**Author:** ![Hang](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/hang/32/865_2.png) [@Hang](https://talk.atomisystems.com/u/Hang)\
**Post date:** [August 14, 2023, 2:12am UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715/4 "2023-08-14T02:12:19Z")

</div>

Hi @Denilson_Reis,

The complete code is already included in the sample project above. You can preview the output and find the detailed script code in the **On Load** event of the project. (To access it, navigate to **ActivePresenter** \> **Project** \> **Properties** \> **Interactivity** tab in the **Properties** pane.

Best regards,  
Hang

---

<div class="post-metadata">

**Author:** ![Denilson\_Reis](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/denilson_reis/32/2636_2.png) [@Denilson\_Reis](https://talk.atomisystems.com/u/Denilson_Reis)\
**Post date:** [August 14, 2023, 3:44am UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715/5 "2023-08-14T03:44:35Z")

</div>

Thank you, Hang! I got it! I could not understand much about where should we set the date to have it expire. Can you give me an example if I want it to expire in 100 days?

---

<div class="post-metadata">

**Author:** ![Hang](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/hang/32/865_2.png) [@Hang](https://talk.atomisystems.com/u/Hang)\
**Post date:** [August 14, 2023, 4:01am UTC](https://talk.atomisystems.com/t/expire-date-for-training-provided-as-html5/7715/6 "2023-08-14T04:01:05Z")

</div>

In this case, you calculate the day that is 100 days after and adjust it as the default value for **expiryDate** ( **Home** tab \> **Variables** \> Double click on the **expiryDate** variable). For example:

 ![image](https://talk.atomisystems.com/uploads/default/original/2X/8/8048dc1aa57d93a8ce82209b164d740066a4e9db.png)

Best,  
Hang
