# Automatically Update WebApp Components like Plots with Genie/Stipple

**URL:** <https://discourse.julialang.org/t/automatically-update-webapp-components-like-plots-with-genie-stipple/77725>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 10, 2022, 10:37pm UTC](https://discourse.julialang.org/t/automatically-update-webapp-components-like-plots-with-genie-stipple/77725 "2022-03-10T22:37:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stakaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stakaz/32/4740_2.png) [@stakaz](https://discourse.julialang.org/u/stakaz)\
**Post date:** [March 10, 2022, 10:37pm UTC](https://discourse.julialang.org/t/automatically-update-webapp-components-like-plots-with-genie-stipple/77725/1 "2022-03-10T22:37:02Z")

</div>

Hello, I would like to know if there is a generic way of automatically update e.g. plots or other elements on the webpage created with stippleUI without explicit triggering some buttons or sliders.

I would like to run a simulation and show the results live in a WebApp.

Some hints would be great.

---

<div class="post-metadata">

**Author:** ![GenerallyClueless](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@GenerallyClueless](https://discourse.julialang.org/u/GenerallyClueless)\
**Post date:** [July 19, 2023, 7:51pm UTC](https://discourse.julialang.org/t/automatically-update-webapp-components-like-plots-with-genie-stipple/77725/2 "2023-07-19T19:51:19Z")

</div>

Hi @stakaz I just came across your question and I think it is very interesting. You have probably found a solution already, but I will post something anyway. Keep in mind that I am new to Julia and the community here, so take my advice with caution 🤣

I have been working with Genie and Stipple recently and I think this approach will work:

1. Use the handlers to create a reactive variable “TimerEvent” like @out TimerEvent

2. Use a handler to monitor the timer change:

Just a side note… you can declare multiple onchange events if you need to respond differently to different events… for example adding a reset button (first thing I thought of):

```
 @onchange resetBtn begin  
      ...... [your code to reset plots or other elements].... 
  end 

```

1. I think you can use the javascript setInterval() function [mdn web docs - setInterval](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) to set your desired interval. The code that you set could change the value of the reactive variable, like TimerEvent =! TimerEvent to trigger the onchange handler event.
