Código PHP:
$sql="select * from itil_vp where estado='A' order by cod_vp";
echo "<select name='vp' class='btn' onChange='xajax_ger(document.form1.vp.options[document.form1.vp.selectedIndex].value)'>";
echo "<option value='0'> </option>";
foreach ($dbh->query($sql) AS $row)
{
echo "<option value='".$row['COD_VP']."'>".$row['DETALLE']."</option>";
}
echo "</select></td></tr>"
."<tr><td class='P' align='right'>AREA:</td>"
."<td>
<div id='ger'>
<select name='gere' class='btn' onChange='xajax_cargo(document.form1.gere.options[document.form1.gere.selectedIndex].value)'>
<option value='0'> </option>
</select>
</div>
</td></tr>"
Código PHP:
function ger($vp)
{
include('../hosts/itc_mon.host.php');
try
{
$dbh = new PDO($db,$u,$p);
} catch (PDOException $exception) {
echo "Error de conexion: " . $exception->getMessage();
}
$sql="select cod_ger,detalle from itil_gerencia where cod_vp='".$vp."' and estado='A'";
$ger="<select name='gere' class='btn' onChange='xajax_cargo(document.form1.gere.options[document.form1.gere.selectedIndex].value)'>
<option value='0'> </option>";
foreach ($dbh->query($sql) AS $row)
{ $ger .= "<option value='".$row['COD_GER']."'>".$row['DETALLE']."</option>";}
$ger.="</select>";
$gerencia=new xajaxResponse();
$gerencia->assign('ger','innerHTML',$ger);
$dbh=NULL;
return $gerencia;
}
SI alguien podria ayudarme o indicarme donde poder conseguir un buen manual de xajax o alternativas a este framework