![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
20/08/2002, 11:49
|
![Avatar de .](http://static.forosdelweb.com/customavatars/avatar19195_1.gif) | | | Fecha de Ingreso: mayo-2002 Ubicación: Tampico
Mensajes: 906
Antigüedad: 22 años, 9 meses Puntos: 1 | |
Re: ayuda con variables Hubo un pequeño descuido en el mensaje de arriva
//pagiana padre
if (variable == 1) {
var1 = "hola"
document.getElementById('secreto').value=var1;
}
else {
var1= "chao";
document.getElementById('secreto').value=var1;
}
<input type=hidden id=secreto>
---------------------------------------
//pagina hija
var1 = parent .document.getElementById('secreto').value;
document.write(var1);
puedes usar:
parent
top
opener
dependiendo si trabajas con frames, iframes o popups |