Pavel Sergeev
Pavel Sergeev

Reputation: 25

Plotly Dash: How to open external link from callback?

I'm working on Dash for data visualisation using Python. Using the html.A component is not a solution for me. Since the user himself has to click on the link. I need to do some calculations before opening an external link. Can I somehow open an external link in a new tab using the callback code?

Upvotes: 1

Views: 3813

Answers (1)

coralvanda
coralvanda

Reputation: 6616

You can do this. If you need to do your calculations in Python, then I would say probably do that in one callback, which triggers a second callback. Write the second one as a clientside callback and include something like this to open a link using JS.

Upvotes: 2

Related Questions