Welcome Guest, Not a member yet? Register   Sign In
Is it possible give a view a target?
#1

[eluser]Joozt[/eluser]
I was wondering if it is possible to give a view a target. I can't really find this information in the user guide, so I was wondering if anyoen knows that.

So for example I want to load a view in a new browser window, like a popup.

Thanks in advance.
#2

[eluser]xwero[/eluser]
I think a view shouldn't be aware of where it is loaded, that is a job for html and javascript. I use jquery and jqmodal for this example
Code:
// controller
$popup['content'] = $this->load->view('content','',true);
$page['msg'] = $this->load->view('popup',$popup,true);
$this->load->view('page',$page);
// views popup.php
<div class="jqmWindow" id="msg">&lt;?php echo $content; ?&gt;</div>
// site.js
if($('#msg').length == 1)
{
    $('#msg').jqm().jqmShow();
}




Theme © iAndrew 2016 - Forum software by © MyBB