astyagi2
(Ashishtyagi10)
1
Hello all,
I am linking the pdf in my application using
CHtml::link(CHtml::encode($model->ApplicationDocument), Yii::app()->baseUrl . ‘assets/uploads/documents/’ . $model->ApplicationDocument)
I want to open it in a new tab, how can I achieve this.
Thanks
Keith
(Kburton)
2
CHtml::link(CHtml::encode($model->ApplicationDocument),
Yii::app()->baseUrl . 'assets/uploads/documents/' . $model->ApplicationDocument,
array('target'=>'_blank')
);
The target attribute is allowed again in HTML5, and is supported in pretty much all browsers.