[eluser]Diegosf93[/eluser]
Hi i have this problem to load a select of countries i have this code:
JS
Code:
function CargarPaises () {
elegido=$("#pais").val();
$.post("Panel_Admin/Traer_Paises", { elegido: elegido }, function(data){
$("#ciudad").html(data);
});
Controller
Code:
public function Traer_Paises($id_region)
{
$paises=$this->Admin_Model->Traer_Paises($id_region);
foreach ($paises as $pais) {
echo "<option> $pais->pais </option>";
}
And the result is nothing dont load nothing in the select.