Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/08/2008, 08:10
Avatar de farra
farra
 
Fecha de Ingreso: marzo-2008
Ubicación: Aqui estoy
Mensajes: 574
Antigüedad: 16 años, 11 meses
Puntos: 20
Pregunta Respuesta: Cambiar el titulo de la pagina por la del iframe dentro de ella

tengo una pagina Index.html

dentro hay un iframe test.php

index.html:
Código HTML:
<!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=utf-8" />
<title>Untitled Document</title>
</head>

<body><iframe src="test.php?titulo=Hola Mundo!" width="400" height="400"></iframe>
</body>
</html> 
test.php:
Código HTML:
<!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=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<script language="javascript">
  document.title=<?php echo htmlentities($_GET['titulo']); ?>
</script>

hola mundo!
</body>
</html> 
como modifico el script para que cuando abra test.php?titulo=Hola Mundo!

???
__________________
Firma:
Es mas dificil para el mono entender que el hombre desciende de el....

PD: Siempre doy karma al que me da una buena respuesta... ;0)