Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/05/2008, 07:00
Avatar de nicolaspar
nicolaspar
 
Fecha de Ingreso: noviembre-2004
Ubicación: Villa Ballester Bs-As|Ar
Mensajes: 2.002
Antigüedad: 19 años, 5 meses
Puntos: 34
Re: Frames y variables

No comprendo bien, pero me remito al problema inicial. Si vos, desde el padre haces:

Código PHP:
<? $var 'nico'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
</head>
<body>
<iframe src="hijo.php?var=<?=$var;?>" width="400" height="500"></iframe>
</body>
</html>
Luego, desde el hijo podrás hacer:
Código PHP:
<? echo 'hola '. (empty($_GET['var'])? ', Quién eres?' $_GET['var']); ?>
A su vez podes usar cookies, sessiones o cualquier global. También podrías usar javascript para llamar a una función u objeto o variable del padre usando document.parent.xxxxx


Saludos, espero que te sea de ayuda,
__________________
Mi punto de partida es Que Bueno Lo Nuevo