Welcome Guest, Not a member yet? Register   Sign In
Function Redirect() not send to browser
#1

(This post was last modified: 12-31-2020, 11:45 AM by php_rocs.)

I try redirect from a controller to another controller, and the url in the browser is not updated, even though the driver is loaded.
Performing inspection of the code, I observe that the load returns http 200 code, but does not refresh the screen.

View.php
Code:
    function AdministrarOMejoras(id)
    {
        // Redireccion al controller de Oportunidades
         $.post(
            '<?php echo site_url('C_Evaluacion/ajax_AdministrarOMejoras')?>',
                {
                IdEvaluacion: id
                }
        );
    }   


Controller C_Evaluacion.php

Code:
    public function ajax_AdministrarOMejoras()
    {
        $this->load->helper('url');
        $IdEvaluacion = $this->input->post('IdEvaluacion');

        redirect('Mejoras/'.$IdEvaluacion, 'location' );

    }  
   

Route

Code:
$route['Mejoras/(:any)'] = 'C_OportunidadMejora/getOMByEvaluation/$1';



Mejoras/getOMByEvaluation Controller/Method
Code:
    function getOMByEvaluation($idEv){  
       
         $data["IdEvaluacion"] = $idEv;
         $data["title"] = "Oportunidades de Mejora"; 
        
         $this->load->view('layouts/Header', $data);        
         $this->load->view('operaciones/OportunidadesMejora_view', $data); 
         $this->load->view('layouts/Footer');         

    } 


Code inspection




OportunidadesMejora_view never show in browser.


can you help me with this?
Appreciate your help
Tnxs
Reply


Messages In This Thread
Function Redirect() not send to browser - by mabraham - 12-31-2020, 10:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB