[eluser]Soporte[/eluser]
Hello,
I appreciate any help. In one view, called "ventas" I have next code
</head>
<body >
[removed]
function mostrarError()
{
if (<?php $modo=isset($modo)?$modo:"1"; echo $modo;?> == 2){
alert("---------------------------------------------------------");
$('#ventana').click();
}
}
[removed]
but, whether modo = 2, never run the following code "$('#ventana').click();"
and in the controller, I have :
public function graba()
{
$ip= $this->input->ip_address();
$datos = explode(",",$_POST['datos']);
list($idart, $canti, $precio) = $datos;
$data['idarti']=$idart;
$data['cant1'] =$canti;
$data['precio']=$precio;
$data['ip'] =$ip;
$result=$this->ventas->graba_modelo($data);
if ($result['huboerror']==false){
redirect("ventas/nuevo");
}else{
$data['title']="------------------";
$data['modo']="2";
$data['menserror']=$result['menserror'];
$this->load->view('ventas/Ventas',$data);
}
}
Many thanks in advance !