Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/05/2014, 12:01
Avatar de nexus44
nexus44
 
Fecha de Ingreso: octubre-2012
Ubicación: Piura
Mensajes: 108
Antigüedad: 12 años, 4 meses
Puntos: 1
Exclamación Enviar valor de pagina hija a padre

Vamos al grano , lo que intento hacer es enviar 2 valores a mas desde una pagina hija a una padre y aprescan en los input's del formulario del padre ; pero ingreso diferentes dígitos se me repite el mismo al momento de enviarlo ala pagina padre. y si coloco a y b ; deberia ser asi pero en este caco los dos me salen b y b

Aqui mi codigo :

index.php => Pagina padre

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

proceso.php => Pagina hija

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

"Nuestra capacidad se aleja de la Humanidad"