I am looking for a way to open a report in a new window using codeigniter. Still I did not find a proper way to do this. I need to send an array of data to this view as well and I think that won't be a big problem as following code normally used to pass an array of data to a view.
$this->load->view('report',$data);
My problem is how to open it in a new window using JavaScript,jQuery or PHP if there is a method. Some help will be really helpful. Thanks.
Try this way:
echo anchor('controller/function', 'Show in New Window', array('target' = > '_blank'));
Or maybe you can use JQuery trick
使用HTML,您可以在新页面中打开链接,例如:
<a href="link of report loding controller/function" target="_blank" >REPORT</a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.