Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Messagebox with dash on button click

Is it possible to launch a messagebox on button click callback ?
I didn’t find any example of documentation of doing that, so I’ve been trying to create an invisible div and on button click populated it with

html.Script('alert(1);', type='text/javascript')
Which didn’t work.
Any suggestions ?

That particular example isn’t possible because Dash doesn’t execute arbitrary javascript (for security reasons). So, if you wanted a custom message box, that would need to be encapsulated as a custom Dash component (