# Trigger when opening webpage

**URL:** <https://discourse.nodered.org/t/trigger-when-opening-webpage/12503>\
**Category:** Dashboard\
**Created:** [23 June 2019 08:46 UTC](https://discourse.nodered.org/t/trigger-when-opening-webpage/12503 "2019-06-23T08:46:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [23 June 2019 08:46 UTC](https://discourse.nodered.org/t/trigger-when-opening-webpage/12503/1 "2019-06-23T08:46:16Z")

</div>

I have the flow setup in node-red. When I click the timestamp button, the dashboard loads all of my data from my dynamodb and works perfectly, but I have to click the timestamp button.

How do I make it so when I load the webpage, this happens automatically?

 ![node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a625329271153682c3c172fdcc692a72bc2f4eaa.png)

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [23 June 2019 08:59 UTC](https://discourse.nodered.org/t/trigger-when-opening-webpage/12503/2 "2019-06-23T08:59:10Z")

</div>

If you look inside the 'inject' node (i.e. double click it) there's an option [] inject once after [] seconds.  
Check these and it should work for you.

---

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [23 June 2019 09:02 UTC](https://discourse.nodered.org/t/trigger-when-opening-webpage/12503/3 "2019-06-23T09:02:07Z")

</div>

Thanks very much!

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 June 2019 12:08 UTC](https://discourse.nodered.org/t/trigger-when-opening-webpage/12503/4 "2019-06-23T12:08:24Z")

</div>

Use the ui\_control node - it emits a connect event when a new browser connects and you can use that to trigger your flow to (re)populate the dashboard as required.
