Foros del Web » Programando para Internet » Javascript »

Problema con Iframe

Estas en el tema de Problema con Iframe en el foro de Javascript en Foros del Web. Hola buenas tardes, espero alguien me pueda ayudar por que estoy un mucho atascada con este problemita. Tengo el siguiente código Código: function abreventana(murl){ var ...
  #1 (permalink)  
Antiguo 05/06/2008, 12:58
Avatar de LauraDark  
Fecha de Ingreso: febrero-2007
Ubicación: México, DF
Mensajes: 291
Antigüedad: 17 años, 2 meses
Puntos: 6
Problema con Iframe

Hola buenas tardes, espero alguien me pueda ayudar por que estoy un mucho atascada con este problemita.

Tengo el siguiente código

Código:
function abreventana(murl){
var ParamsVentana='height='+((screen.availHeight)-100)+',width='+((screen.availWidth)-100);	
ParamsVentana=ParamsVentana+',top=1,left=1,resizable=yes,scrollbars=yes,location=no,status=no,toolbar=no,menubar=no'
window.open(murl,"_self",ParamsVentana).focus();
}
function abrecontenido(murl){
if(document.getElementById("Contenido")) document.getElementById("Contenido").src=murl
if(document.getElementById("Contenido")) document.getElementById("Contenido").style.zindex="-1"
}
function DibujaIframe(tipo,url){
if(tipo=="1"){
var w=document.body.clientWidth- 31;
var wf = w.toString();
pLeft="31px";
var cad="<iframe id='Contenido' src='"+url+"' height='100%' width='1000px' frameborder='0' style='position:absolute;top:0px;left:"+pLeft+";'></iframe>";
document.write(cad);
	}
else if(tipo=="2"){
var h=document.body.clientHeight- 31;
var hf = h.toString();
pTop="31px";
var cad="<iframe id='Contenido' src='"+url+"' height='"+hf+"' width='806px' frameborder='0' style='position:absolute;top:"+pTop+";left:0px;'></iframe>";
document.write(cad);
	}
}
function activo(obj){
if(navigator.appName != 'Netscape') obj.className+=" over";
}
function inactivo(obj){
if(navigator.appName != 'Netscape') obj.className=obj.className.replace(" over", "");
}
function Ajusta(){
var h=document.body.clientHeight- 31;
if(document.getElementById("Contenido")) document.getElementById("Contenido").height=h.toString();
}
window.onresize=Ajusta;
El problema es cuando cargo por primera vez la página y me dice que no encuentra ningún contenido, tengo que dar click en el inicio para que carge.

Espero alguien me pueda ayudar!!
  #2 (permalink)  
Antiguo 05/06/2008, 18:46
Avatar de LauraDark  
Fecha de Ingreso: febrero-2007
Ubicación: México, DF
Mensajes: 291
Antigüedad: 17 años, 2 meses
Puntos: 6
Respuesta: Problema con Iframe

De verdad necesito su ayuda amigos, estoy super atorada con este código!!!


No sé si tenga que declarar que en alguna de las funciones se desplegue el contenido???

Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 22:46.