# How to detect changes by javascript in dash

**URL:** <https://community.plotly.com/t/how-to-detect-changes-by-javascript-in-dash/83397>\
**Category:** Dash Python\
**Created:** [March 27, 2024, 9:07pm UTC](https://community.plotly.com/t/how-to-detect-changes-by-javascript-in-dash/83397 "2024-03-27T21:07:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![AnnMarieW](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AnnMarieW](https://community.plotly.com/u/AnnMarieW)\
**Post date:** [March 27, 2024, 10:36pm UTC](https://community.plotly.com/t/how-to-detect-changes-by-javascript-in-dash/83397/3 "2024-03-27T22:36:38Z")

</div>

You can find an example of what @jinnyzor recommended here:

> [@Changing the value of a input from javascript callback does not trigger the callback associated with that input](https://community.plotly.com/t/changing-the-value-of-a-input-from-javascript-callback-does-not-trigger-the-callback-associated-with-that-input/82922/2):
>
> Hi @mainul Good timing! This is possible as of dash 2.16.1 by using dash\_clientside\_set\_props The docs aren’t available yet, but you use it like this: dash\_clientside.set\_props(id, {props to set}) so in your case it would be: dash\_clientside.set\_props("last-key-pressed", {value: event.key}) Here’s the whole callback app.clientside\_callback( """ function(n\_clicks) { document.addEventListener('keydown', function(event) { const allowedKeys = ['ArrowL…

---

_[View the full topic](https://community.plotly.com/t/how-to-detect-changes-by-javascript-in-dash/83397)._
