Welcome Guest, Not a member yet? Register   Sign In
Main Page with Menu not load outher view same Main Page
#1

Huh
In separate is load sucessfull, but i like load same page and kepping menu and not redirect to new page

Code:

Main Page, seleciona Menu "Objects/view", in page load occurs error because not match the vareables.

public function view(){

$data["title"] = "Objetos";
$qry = $this->Objects_model->select();

$this->table->set_heading("Descrição","Fornecedor","Modelo");

foreach ($qry as $result=>$value){

$this->table->add_row( img("storage/system/".$value->image), $value->description,$value->manufacturer,$value->model);

}

$data["table"] = $this->table->generate();

$this->load->view("Objects",$data);

}




Example:

<html>
<body>
  <div class=menu> 
       <ul>
            <li><a href="objects/view">Objetos</a>
            <li><a href="tyepofobjects/view">Tipo de Objetos</a>
        <ul> 
   </div>
   <!-- CLIK AND LOAD RESULT VIEW SAME PAGE -->
<body>
<html>

Please, i can't find solution for this problem
Reply
#2

Try this:

PHP Code:
// Make CI view variables global
$this->load->vars($data);

// Load the CI view
$this->load->view("Objects"); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB