Open a view with Codeigniter on a different page

2

I would like to open a view on another browser tab using Codeigniter, does anyone know how to do it?

In% w / o "a href" I use the tag property to achieve.

How do I pass this property on target=_blank

    
asked by anonymous 08.02.2017 / 16:14

1 answer

3

The way to do this is as you already did, using target=_blank in the link.

If you look in the documentation the only overhead you will find of the view() method is one for pass a data object. There is nothing to be done at Controller level to open in a new tab or popup. If you provide more detail as to why I needed this, I can give you some other suggestion, probably with Ajax and JavaScript.

Link:

<a href="index.php/clientes/inserir" target="_blank">Inserir</a>

Controller:

class Clientes extends CI_Controller {
   public function inserir() {
      $this->load->view("inserir");
   }
 }
    
08.02.2017 / 17:32