Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/10/2008, 05:52
matak
 
Fecha de Ingreso: julio-2008
Ubicación: Alcañiz-Teruel-España
Mensajes: 182
Antigüedad: 15 años, 9 meses
Puntos: 5
Respuesta: Pasar texto de ventana hija a textarea de ventana madre

Prueba este código, si te satisface lo adaptas a tu problema. Si algo no entiendes gustoso te explico.

madre.html

Código HTML:
<html>
<head>
    <title>Comunicacion Madre -&gt; Hija</title>
<script>
var miPopup
function abreVentana(){
    miPopup = window.open("hija.php","miwin","width=300,height=150,scrollbars=yes")
    miPopup.focus()
}
</script>
</head>
<body>

       <input type=text name=texto value="" size=30 maxlength=30 />
       
       <input type=button name=Seleccionar value=""/>


</body>
</html> 
hija.html

Código HTML:
<html>
<head>
    <title>Comunicacion Madre &lt;- Hija</title>
<script>
function pontexto(texto){
    opener.document.formul.texto.value = pref
    window.close()
}
</script>
</head>

<body>
<h1>Lista de textos a elegir. Dobleclick en el que desees</h1>

<table>
<tbody>
<tr ondlbclick = "javascript:pontexto('aaaaaaaaaaaaaaa')">
<td>
aaaaaaaaaaaaaaa
</td>
</tr>
<tr ondlbclick = "javascript:pontexto('bbbbbbbbbbbbbbb')">
<td>
bbbbbbbbbbbbbbb
</td>
</tr>
<tr ondlbclick = "javascript:pontexto('ccccccccccccccc')">
<td>
ccccccccccccccc
</td>
</tr>
<tr ondlbclick = "javascript:pontexto('ddddddddddddddd')">
<td>
ddddddddddddddd
</td>
</tr>
<tr ondlbclick = "javascript:pontexto('eeeeeeeeeeeeeee')">
<td>
eeeeeeeeeeeeeee
</td>
</tr>
</tbody>
</table>


</body>
</html>

Si te da algun error dilo porque no lo he probado

Saludos
__________________
Si quieres puedes y si puedes debes. Imposible is nothing!!!