# HTML widget not working when dashboard is locked

**URL:** <https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [April 2, 2020, 8:16am UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775 "2020-04-02T08:16:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fourkane\_Irki](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@Fourkane\_Irki](https://community.cumulocity.com/u/Fourkane_Irki)\
**Post date:** [April 2, 2020, 8:16am UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775/1 "2020-04-02T08:16:48Z")

</div>

Hi, I am using this sampple code (HTML and Javascript) to display the current date and time. It works only when the dashboard is unlocked, the HTML widget does not display the datetime when I lock the dashboard.

[code]

 Test.js

---

<div class="post-metadata">

**Author:** ![Michael\_Welsing](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Michael\_Welsing](https://community.cumulocity.com/u/Michael_Welsing)\
**Post date:** [April 21, 2020, 10:30am UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775/2 "2020-04-21T10:30:35Z")

</div>

Hi Fourkane,

do you have the link to the dashboard?

best regards  
Michael

---

<div class="post-metadata">

**Author:** ![Fourkane\_Irki](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@Fourkane\_Irki](https://community.cumulocity.com/u/Fourkane_Irki)\
**Post date:** [April 22, 2020, 7:25am UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775/3 "2020-04-22T07:25:36Z")

</div>

Hi Michael,

Here is the link of my dashboard: [Cockpit](https://firki.us.cumulocity.com/apps/cockpit/index.html#/device/407/dashboard/2985297)

It turns out you have to refresh the entire page after you lock the dashboard. You can still investigate why the dispaly dispears when locking or unlocking the dashboard.

Thanks

---

<div class="post-metadata">

**Author:** ![Michael\_Welsing](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Michael\_Welsing](https://community.cumulocity.com/u/Michael_Welsing)\
**Post date:** [April 22, 2020, 9:38am UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775/4 "2020-04-22T09:38:45Z")

</div>

Hi,

thanks for the link. On which browsers do you see the issue?

best regards  
Michael

---

<div class="post-metadata">

**Author:** ![Fourkane\_Irki](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@Fourkane\_Irki](https://community.cumulocity.com/u/Fourkane_Irki)\
**Post date:** [April 22, 2020, 4:03pm UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775/5 "2020-04-22T16:03:12Z")

</div>

Chrome

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 2, 2021, 3:44pm UTC](https://community.cumulocity.com/t/html-widget-not-working-when-dashboard-is-locked/3775/6 "2021-04-02T15:44:26Z")

</div>


