When loading one view in to another with jquery i do that.
In file view 5
load("<?php echo site_url("controller/name")?>");
I’m loading the name function that contains the view.But how to get the variables from that name function that is loading a view in to that view ?
function name(){
$a['aa'] = 1;
$this->load->view("file",$a);
}
And i wan to load the $aa variable where i’m loading the function with jquery , this is the loaded function – name, the default view is different and with different function in the controller.
Why don’t you pass the $aa through the controller like this?
Then you can do
load('<?php echo site_url('controller/name/1') ?>');You might want to sanitize $aa as well.