Black Lives Matter. Please consider donating to Black Girls Code today.

Execute Action of a link within a callback?

Hello everyone,

Here is my Situation:
The user presses a button. In the callback I perform simple calculations and then I end up with an URL. The URL changes everytime and points to a file. Now I need to open that url within the browser, so that the file is being downloaded.
When I take this URL and generate a Link with it, everything works fine, BUT the user has to first press the Button (in order to generate the link) and then press the link, which is inconvenient…

I would like to make everything happen in just one press. Is there any way to make the browser open a url in a new window within the callback Code?
Or is there any dash core component which can open URLs but the url can be calculated on the fly?

Hope you have some suggestions,



I found a solution. There library called visdcc, that allows to run javascript on an interaction callback: