Can we make href dynamic in dcc.Link?

I am new to dash. I have create a button using dcc.Link . I am trying to update href component using a callback to update href link from "/" to "/{variable1}/{variable2}", but it is not working.


            html.Button("Launch", n_clicks=0, id="my_button"),






Hey, could you show us what you tried to write in your callback so we can help you make it work?

Thanks for your reply but this is resolved. I was trying to update the link on button click and expecting it to open the updated link in new tab, but instead I split it into 2 callbacks, one to update href link and other to perform nclick operation.

1 Like

Could you be more specific how did you split it to two functions? I am facing the similar problem.