Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/10/2013, 08:49
rufus
 
Fecha de Ingreso: mayo-2009
Ubicación: Andalucia
Mensajes: 650
Antigüedad: 15 años, 10 meses
Puntos: 1
problema con pasar datos de una ventana a otra con javascript

tengo dos formularios

ejercicio4.html
Código Javascript:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <meta charset="utf-8">
  5.  
  6.         <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  7.         Remove this if you use the .htaccess -->
  8.         <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9.  
  10.         <title>HTML</title>
  11.         <meta name="description" content="">
  12.         <meta name="author" content="rufus">
  13.         <script src="ej4_6.js"></script>
  14.  
  15.  
  16.         <meta name="viewport" content="width=device-width; initial-scale=1.0">
  17.  
  18.         <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
  19.         <link rel="shortcut icon" href="/favicon.ico">
  20.         <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  21.     </head>
  22.  
  23.     <body>
  24.         <div>
  25.             <header>
  26.                 <h1>HTML</h1>
  27.             </header>
  28.             <nav>
  29.                 <p>
  30.                     <a href="/">Home</a>
  31.                 </p>
  32.                 <p>
  33.                     <a href="/contact">Contact</a>
  34.                 </p>
  35.             </nav>
  36.  
  37.             <div>
  38.                     <form name="formulario">
  39.                        
  40.                           <input type="button" name="buttonOpen" onclick ="openWindow()" value="buttonOpen" style='visibility:visible;'/>
  41.  
  42.                           <input type="button" name="buttonSend" value="buttonSend" style='visibility:hidden;' onclick ="sendValueToWindow()"/>
  43.  
  44.                           <input type="button" name="closeButton" value="closeButton"
  45.                           style='visibility:hidden;'/>
  46.  
  47.                           <input type="text" name="valorRecibido" style='visibility:hidden;'/>
  48.                          
  49.                        
  50.                        
  51.                        
  52.                     </form>
  53.  
  54.            
  55.             </div>
  56.  
  57.             <footer>
  58.                 <p>
  59.                     &copy; Copyright  by rufus
  60.                 </p>
  61.             </footer>
  62.         </div>
  63.     </body>
  64. </html>

otro ejercicio4_newwindow.html

Código HTML:
Ver original
  1. <div>
  2.                     <form name="formulario">
  3.                         <input type="button" name="buttonSendToMain" />
  4.                        
  5.                         <input type="text" name="valorRecibidoNew" value="valor recibido" />
  6.                        
  7.                     </form>
  8.             </div>

y un archivo con las funciones de javascript para manipular los formus