Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/02/2006, 17:54
Avatar de Diabolus
Diabolus
 
Fecha de Ingreso: diciembre-2004
Mensajes: 453
Antigüedad: 20 años, 3 meses
Puntos: 0
desesperado con iframe!!!

hola mirad os cuento la historia,encontre por inet un codigo para que al añadir un iframe este tomara el tamaño de la pagina que queremos añadir.
Hasta aqui bien me funciono etc..,pero ahora lo quiero acoplar a los foros phpbb2...y no hay manera!....mirad asi tengo el codigo:

en la pagina principal tengo esto:
<script>
function inicio(){
f = capa.offsetHeight
capa.style.height = f;
}
</script>
</head>
<body onload="inicio();">




en la que llamo esto:
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html dir="{S_CONTENT_DIRECTION}">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<
meta http-equiv="Content-Style-Type" content="text/css">
<
style type="text/css">
<!--
.
Estilo3 {
    
font-size7px;
    
font-weightbold;
}
-->
</
style>
{
META}
{
NAV_LINKS}
<
title>{SITENAME} :: {PAGE_TITLE}</title>
<
link rel="stylesheet" href="templates/gamepro/{T_HEAD_STYLESHEET}" type="text/css">
<!-- 
BEGIN switch_enable_pm_popup -->
<
script language="Javascript" type="text/javascript">
<!--
    if ( {
PRIVATE_MESSAGE_NEW_FLAG} )
    {
        
window.open('{U_PRIVATEMSGS_POPUP}''_phpbbprivmsg''HEIGHT=225,resizable=yes,WIDTH=400');;
    }
//-->
</script>
<!-- END switch_enable_pm_popup -->
<script>
function inicio(){
f = contenido.offsetHeight
parent.central.style.height = f;
}
</script>
</head>
<body onload="inicio();">
<div id="contenido" style="overflow:auto;"> 
me da el siguiente error:
Error: Parent.central.style es nulo o no s un objeto

como puedo solucionarlo?
gracias ;)

P.D: Estoy super pez en JS