Html Button Link to new Window

Hi All,

How would I create an HTML button which links to a new window?

This is what I have, but have no idea where to start with this?

I need a link as ‘/controller/view’ and it must open in a new window/tab?




<?= Html::button('Preview Document', ['class' => 'btn btn-primary']) ?>



Thanks

Hi, you can style link to look like button




<?= Html::a('Preview Document', 'controller/view', ['class' => 'btn btn-primary', 'target' => '_blank']) ?>



Thank you, that works great.