Reopening page on Codeigniter -


i trying reopen same page on codeigniter. see code below:

<?php class leads extends ci_controller { public $tempname; public $tempfrom; public $tempto;  public function index() {     $this->load->model('lead');     $leads = $this->lead->getallleads();     $pagenum = count($leads);     $this->load->view('main', array('leads' => $leads, 'pagenum' => $pagenum)); }  public function getleads(){     $this->load->model('lead');     $name = $this->input->post('name');     $from = $this->input->post('from');     $to = $this->input->post('to');     $leads = $this->lead->getleads($name, $from, $to);     $pagenum = count($leads);     $this->load->view('main', array('leads' => $leads, 'pagenum' => $pagenum)); } } ?> 

as can see, first open 'main' 'index()'. in main, call 'getleads()', page not getting updated. because can't refresh data while on same page? if yes, how can work around it? lot!

you cannot call controller view. sounds should using ajax in "main" view additional data getleads().


Comments

Popular posts from this blog

c++ - rosrun via ssh doesnt start a node properly -

android - questions about switching from C2DM to GCM -

How to resolve Delphi error: Incompatible types: 'PWideChar' and 'Pointer' -