# Clicks on buttons don't work on pn.card

**URL:** <https://discourse.holoviz.org/t/clicks-on-buttons-dont-work-on-pn-card/2492>\
**Category:** Panel\
**Tags:** panel\
**Created:** [June 28, 2021, 3:31pm UTC](https://discourse.holoviz.org/t/clicks-on-buttons-dont-work-on-pn-card/2492 "2021-06-28T15:31:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahuang11](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ahuang11/32/4947_2.png) [@ahuang11](https://discourse.holoviz.org/u/ahuang11)\
**Post date:** [June 28, 2021, 3:31pm UTC](https://discourse.holoviz.org/t/clicks-on-buttons-dont-work-on-pn-card/2492/1 "2021-06-28T15:31:15Z")

</div>

```auto
import panel as pn
pn.extension()
url = "https://discourse.holoviz.org/t/is-there-a-way-to-click-button-and-open-a-new-link-in-a-new-tab/1560/4"
link_button = pn.widgets.Button(name="some link", button_type="primary")
link_button.js_on_click(code="window.open('{url}')".format(url=url))
pn.Card(header=link_button)

```

If click on button, the link doesn’t open
