Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/03/2010, 16:42
Avatar de netovs
netovs
 
Fecha de Ingreso: enero-2010
Ubicación: Mexico DF
Mensajes: 150
Antigüedad: 14 años, 3 meses
Puntos: 9
Respuesta: Crear ventana para seleccionar registro

Si entiendo bien lo que necesitas es crear un formulario que "se alimente" de los datos que son ingresados en una ventana popup del navegador

te dejo un ejemplo simple:

NOTA ambos archivos debes ponerlos en el mismo path (ruta, directorio, etc)

archivo padre.html

Código HTML:
Ver original
  1.  <head>
  2.   <title>Ejemplo ventanas dependientes</title>
  3.   <script language="javascript">
  4.   function Open()
  5.   {
  6.   var sValue = window.showModalDialog('hijo.html','SelectValueWindow');
  7.   document.getElementById("Text1").value = sValue;
  8.   }
  9.   </script>
  10.  </head>
  11.  <body>
  12.  <form name="frm">
  13.   <P>Ventana padre</P>
  14.   <P>
  15.    <INPUT id="Text1" type="text" name="Text1"> <INPUT id="Button1" type="button" value="Button" name="Button1" onclick="Open();">
  16.   </P>
  17.  </form>
  18.  </body>
  19. </html>




Archivo hijo.html
Código HTML:
Ver original
  1.  <head>
  2.   <title>Ventana HIJO</title>
  3.   <script language="javascript">
  4.    function Close()
  5.    {
  6.    window.returnValue = document.frm.Text1.value;
  7.    window.close();
  8.    }
  9.   </script>
  10.  </head>
  11.  <body>
  12.  <form name="frm">
  13.   <P>Ventana Hijo</P>
  14.   <P><INPUT id="Text1" type="text" name="Text1"> <INPUT id="Button1" onclick="Close();" type="button" value="Button" name="Button1"></P>
  15.  </form>
  16.  </body>
  17. </html>