0

I have opened this two page:

  1. Page A
  2. Page B

How to refresh B after something submitted from Test Controller

A Controller:

$this->load->view('admin/page_a');

page_a view:

<?
echo anchor("admin/test/update_data/".$r->k_id,"<input type='button' value='done'>");
?>

Test Controller:

function test($id){
$proc = array('process' => 'In');
$this->mtest->update($id,$proc);
redirect('admin/A/','refresh');
***Some script to refresh page B***
}

B Controller:

$this->load->view('admin/page_b');

page_b view:

some script
Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85

1 Answers1

0

if i understand your code then the solution would be:

<script>
window.onunload = refreshPageB;
function refreshPageB() {
    window.opener.location.reload();
}
</script>

Put this code in PageA

David Coder
  • 1,138
  • 2
  • 14
  • 48