Quentinb
(Quentin)
1
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
Rom
(Rokorolov)
2
Hi, you can style link to look like button
<?= Html::a('Preview Document', 'controller/view', ['class' => 'btn btn-primary', 'target' => '_blank']) ?>
Quentinb
(Quentin)
3
Thank you, that works great.