Welcome Guest, Not a member yet? Register   Sign In
I don't undertand this behavior
#1

[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 !



Messages In This Thread
I don't undertand this behavior - by El Forum - 02-14-2014, 02:54 PM
I don't undertand this behavior - by El Forum - 02-16-2014, 06:36 PM
I don't undertand this behavior - by El Forum - 02-17-2014, 06:00 AM
I don't undertand this behavior - by El Forum - 02-17-2014, 11:57 AM
I don't undertand this behavior - by El Forum - 02-17-2014, 12:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB