Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/07/2012, 13:56
augusto_jaramil
 
Fecha de Ingreso: junio-2004
Ubicación: Ciudad de Panama
Mensajes: 551
Antigüedad: 19 años, 10 meses
Puntos: 8
Respuesta: No detecta change desde ventana hija

Gracias emprear por tu respuesta.....

Voy a mirar el codigo que me enviaste, sin embargo te envio los codigos con los que estoy haciendo las pruebas

Codigo padre.html
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>
<
html>
<
head>
    <
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
title></title>
    <
script language="javascript" type="text/javascript" src="js/jquery.js"></script>
    <script>
        $().ready(function () {
            $("#id").change( function () {
                alert("LLEGO");
            });
        return false;
        });

    function buscar(nom) {
        var llega = "hija.php?nom="+nom.value;
        window.open(llega,"BUSCAR","fullscreen=no,status=no,dependent=yes, width=350, height=400,resizable=0,top=220,left=600");
    }
    </script>
</head>
<body>
    <form id="depe" name="depe">
        <td>Id: </td><td><input type="text" id="id" name="id" value="" /></td>
        <br>
        <td>Nombre: </td><td><input type="text" id="nombre" name="nombre" value="" onChange="buscar(this);" /></td>
    </form<
</body>
</html> 
Codigo hija.php
Código PHP:

<?
$arr
[0]["id"] = "1";
$arr[0]["nombre"] = "A1";
$arr[1]["id"] = "2";
$arr[1]["nombre"] = "A2";
$arr[2]["id"] = "3";
$arr[2]["nombre"] = "A3";

?>
<html>
    <head>
        <script language="javascript">
            function enviar(a,b) {
                opener.document.depe.id.value=a.value;
                opener.document.depe.nombre.value=b.value;
                window.close();
            }
        </script>
    </head>
    <body>
        <form>
            <table border="1">
                <tr><th>Id</th><th>Nombre</th></tr>
        <?php
            $w
=0;
            for(
$j=0$j<3$j++) {
                
$h=$w+1;
                echo 
"<td><input type='radio' name='x' onclick='enviar(this.form.c$w, this.form.c$h);'><input type='hidden' name='c$w' value='"$arr[$j]['id'] ."'>"$arr[$j]['id']."</td><td>";
                echo 
"<input type='hidden' name='c$h' value='"$arr[$j]['nombre'] ."'>"$arr[$j]['nombre'];
                
$w $w 2;
                echo 
"</TR>\n";
            }
        
?>
        </form>
    </body>
</html>
La idea es registrar algún cambio en la caja Nombre, ahí se abre la hija.php, seleccionar cualquier opción, se actualiza en la papá los datos y se debe ejecutar el código jQuery $("#id").change (function () { ..... es decir, debería aparecer el alert "LLEGO", pero pailas, no lo hace....


Mil Gracias
__________________
El que no sabe y sabe que no sabe, es un ignorante...enseñémosle!. El que no sabe y se cree que sabe, es un necio... ¡ignorémosle!.
El que sabe y sabe que sabe, es un sabio... ¡sigámosle!.