Se me presenta la siguiente situacion:
Desde una ventana hija (emergente) envio hacia la ventana padre (?) creadas desde pagina php la siguiente informacion
Código PHP:
Array
(
[nit] => 35506790
[nombre] => MONTENEGRO ESCOVAR ANGELA PATRICIA
[n_comercial] => [lista] => 50
[moneda] =>
[plazo] => 0
[f_vence] => 2008-04-03
[val_cam] =>
[estado] => A
[contacto] =>
[nombre_con] =>
[telefono] =>
[f_pago] =>
[descripcion] =>
[f_entrega] => 2008-04-03
[sitio] => 1
[nom_sucursal] => SUCURSAL 1
[dirent] => CALLE 17 # 68B-88 BOGOTA
[vende] =>
[nvende] =>
[centro] =>
[n_centro] =>
[formas] => Array
(
[0] => Array
(
[codigo] => 102
[descripcion] => CONTADO
[c_tesoreria] => 1101
[cuenta_cartera] => 130515
[cuotas] => N
)
[1] => Array
(
[codigo] => 103
[descripcion] => CREDITO
[c_tesoreria] => 1101
[cuenta_cartera] => 130520
[cuotas] => N
)
[2] => Array
(
[codigo] => 105
[descripcion] => MUESTRAS
[c_tesoreria] => 1101
[cuenta_cartera] => 612004001
[cuotas] =>
)
[3] => Array
(
[codigo] => 106
[descripcion] => EXPORTACIONES
[c_tesoreria] => 1101
[cuenta_cartera] => 130510
[cuotas] =>
)
)
)
La manera como en actualizo la ventana padre desde la ventana emergente es la siguiente:
Código PHP:
<?
.
.
.
function mostrar_compr() {
global $lin, $pagi, $lineasxpagi, $cuantos, $mat_sol, $prg;
?>
<html><head>
<script languaje="javascript">
<!--
function solic(c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w)
{
window.opener.document.depe.nit<?= $lin?>.value = c.value;
window.opener.document.depe.nombre<?= $lin?>.value = d.value;
window.opener.document.depe.lista<?= $lin?>.value = e.value;
window.opener.document.depe.moned<?= $lin?>.value = f.value;
window.opener.document.depe.plazo<?= $lin?>.value = g.value;
window.opener.document.depe.pzo<?= $lin?>.value = g.value;
window.opener.document.depe.alias<?= $lin?>.value = j.value;
window.opener.document.depe.cambio<?= $lin?>.value = i.value;
window.opener.document.depe.sitio<?= $lin?>.value = k.value;
window.opener.document.depe.nom_sucursal<?= $lin?>.value = l.value;
window.opener.document.depe.dirent<?= $lin?>.value = m.value;
window.opener.document.depe.vende<?= $lin?>.value = n.value;
window.opener.document.depe.nvende<?= $lin?>.value = o.value;
window.opener.document.depe.centro<?= $lin?>.value = p.value;
window.opener.document.depe.n_centro<?= $lin?>.value = q.value;
if ("<?= $prg ?>" == "pedido")
{
window.opener.document.depe.contacto.value = s.value;
window.opener.document.depe.nombre_con.value = t.value;
window.opener.document.depe.telefono.value = u.value;
}
window.opener.document.depe.fe.value = '';
window.close();
}
function cerrar()
{
setTimeout("self.close()", 45000);
}
--></script>
<?php include('../configuracion/estilos.php'); ?>
<body topmargin="0" leftmargin="0" bgcolor="#FFF7E7" link="#000000" onLoad="cerrar()">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr><td width="100%" height="100%">
<?php $titulo="Solicitantes "; ?>
<table border="0" width="100%" align=center cellspacing="0" cellpadding="0" height="100%">
<tr><td align="center">
<?php include('../configuracion/tablasuperior.php'); ?>
<table border="0" align=center cellspacing="4" cellpadding="0">
<?php
# <form action="concilia.php" target="izq" method="post" name="banco">
?>
<form action="wclien.php" method="post" name="banco">
<tr><td>
<table border="1" cellspacing="0" cellpadding="1" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
<tr bgColor=#CBD9E5><th>I.D. </th><th>Nombre</th></tr>
<?php
$w=0;
$k1=$pagi+$lineasxpagi;
$p=$pagi;
if ($k1>count($mat_sol))
$k1=count($mat_sol);
for($j=$pagi; $j<$k1; $j++)
{
if ($j % 2 == 0)
echo "<TR bgcolor=#FFF7E5>";
else
echo "<TR bgColor=#FFF7D2>";
$h=$w+1;
$k=$w+2;
$m=$w+3;
$n=$w+4;
$o=$w+5;
$p=$w+6;
$q=$w+7;
$r=$w+8;
$s=$w+9;
$t=$w+10;
$u=$w+11;
$v=$w+12;
$x=$w+13;
$y=$w+14;
$aa=$w+15;
$bb=$w+16;
$cc=$w+17;
$dd=$w+18;
$ee=$w+19;
$ff=$w+20;
echo "<td><input type=radio name=x onclick='solic(this.form.c$w, this.form.c$h, this.form.c$k, this.form.c$m,this.form.c$n,this.form.c$o,this.form.c$p,this.form.c$q,this.form.c$r,this.form.c$s,this.form.c$t,this.form.c$u,this.form.c$v,this.form.c$x,this.form.c$y, this.form.c$aa, this.form.c$bb, this.form.c$cc, this.form.c$dd, this.form.c$ee, this.form.c$ff)'>
<input type=hidden name='c$w' value='". $mat_sol[$j]['nit'] ."'>". $mat_sol[$j]['nit']."</td><td>";
echo "<input type=hidden name='c$h' value='". trim($mat_sol[$j]['nombre']) ."'>". trim($mat_sol[$j]['nombre']) ."(". trim($mat_sol[$j]['n_comercial']) .")";
echo "<input type=hidden name='c$q' value='". trim($mat_sol[$j]['n_comercial']) ."'>";
echo "<input type=hidden name='c$k' value='". $mat_sol[$j]['lista'] ."'>";
echo "<input type=hidden name='c$m' value='". $mat_sol[$j]['moneda'] ."'>";
echo "<input type=hidden name='c$n' value='". $mat_sol[$j]['plazo'] ."'>";
echo "<input type=hidden name='c$o' value='". $mat_sol[$j]['f_vence'] ."'>";
echo "<input type=hidden name='c$p' value='". $mat_sol[$j]['val_cam'] ."'>";
echo "<input type=hidden name='c$r' value='". $mat_sol[$j]['sitio'] ."'>";
echo "<input type=hidden name='c$s' value='". $mat_sol[$j]['nom_sucursal'] ."'>";
echo "<input type=hidden name='c$t' value='". $mat_sol[$j]['dirent'] ."'>";
echo "<input type=hidden name='c$u' value='". $mat_sol[$j]['vende'] ."'>";
echo "<input type=hidden name='c$v' value='". $mat_sol[$j]['nvende'] ."'>";
echo "<input type=hidden name='c$x' value='". $mat_sol[$j]['centro'] ."'>";
echo "<input type=hidden name='c$y' value='". $mat_sol[$j]['n_centro'] ."'>";
echo "<input type=hidden name='c$aa' value='". $mat_sol[$j]['f_entrega'] ."'>";
echo "<input type=hidden name='c$bb' value='". $mat_sol[$j]['contacto'] ."'>";
echo "<input type=hidden name='c$cc' value='". $mat_sol[$j]['nombre_con'] ."'>";
echo "<input type=hidden name='c$dd' value='". $mat_sol[$j]['telefono'] ."'>";
echo "<input type=hidden name='c$ee' value='". $mat_sol[$j]['formas'] ."'>";
echo "<input type=hidden name='c$ff' value='$j'>";
$w = $w + 21;
echo "</TR>\n";
}
?>
</td></tr><tr><td align=right colspan=6>
<b>Total regs : <font color=#ff0000><?=$cuantos ?></font></b>
</td></tr>
</table>
<input type='submit' value='|<--' id='in_bco' name='b_com' style='background-color: #738EB5; height: 18; font-size: 8 pt; font-weight: bold; color: ffffff; border-style: solid; border-width: 1' tabindex='2'>
<input type='submit' value='<--' id='ant_bcor' name='b_com' style='background-color: #738EB5; height: 18; font-size: 8 pt; font-weight: bold; color: ffffff; border-style: solid; border-width: 1' tabindex='2'>
<input type='submit' value='-->' id='av_bco' name='b_com' style='background-color: #738EB5; height: 18; font-size: 8 pt; font-weight: bold; color: ffffff; border-style: solid; border-width: 1' tabindex='2'>
<input type='submit' value='-->|' id='f_bco' name='b_com' style='background-color: #738EB5; height: 18; font-size: 8 pt; font-weight: bold; color: ffffff; border-style: solid; border-width: 1' tabindex='2'>
<input type="hidden" name="siguiente" value="siguiente">
</td></tr>
</form>
</table>
<?php include('../configuracion/tablainferior.php'); ?>
</td>
</tr>
</table>
</td></tr>
</table>
</body>
</html>
<?
}
?>
Los parametros recibidos en function solic(.....) en el penultimo parametro (v) recibo los datos del Array(formas) y en el ultimo parametro (w) recibo el indice o clave del Array que contiene todos los datos que se envian a la ventana padre
Agradezco de antemano la ayuda que me puedan brindar al respecto
Un Cordial Saludo