Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/09/2008, 14:24
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años, 9 meses
Puntos: 834
Respuesta: Ventana flotante no redimensionable

Y porqué no usás algo como esto en lugar de un popup?:
Código PHP:
<!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></title>
<
style>
#capa{ position:absolute; top:-1500px; }
#close{ color:#FFF; background-color:#F00; width:100%;  padding:2px 0}
#close div{ border:1px solid #000; padding:3px; cursor:pointer;text-align:center; width:20px; position:relative; left:770px;}
#abre{ background-color: #F90;cursor:pointer; padding:3px; border:1px dashed #666; width:100px; text-align:center}
</style>
<
script>
function 
getWindowData(){
    var 
widthViewport,heightViewport,xScroll,yScroll,widthTotal,heightTotal;
    if (
typeof window.innerWidth != 'undefined'){
        
widthViewportwindow.innerWidth-17;
        
heightViewportwindow.innerHeight-17;
    }else if(
typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth !='undefined' && document.documentElement.clientWidth != 0){
        
widthViewport=document.documentElement.clientWidth;
        
heightViewport=document.documentElement.clientHeight;
    }else{
        
widthViewportdocument.getElementsByTagName('body')[0].clientWidth;
        
heightViewport=document.getElementsByTagName('body')[0].clientHeight;
    }
    
xScroll=self.pageXOffset || (document.documentElement.scrollLeft+document.body.scrollLeft);
    
yScroll=self.pageYOffset || (document.documentElement.scrollTop+document.body.scrollTop);
    
widthTotal=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,widthViewport);
    
heightTotal=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,heightViewport);
    return [
widthViewport,heightViewport,xScroll,yScroll,widthTotal,heightTotal];
}
function 
q(id){return document.getElementById(id);}
var 
abrir=function(){
    var 
dpag=getWindowData();
    
q('capa').style.top='0px';
    
/* o:
    q('capa').style.top=(dpag[1]/2)-(q('ifr').height)/2+dpag[3]+'px';
    */
    
q('capa').style.left=(dpag[0]/2)-(q('ifr').width)/2+dpag[2]+'px';
}
var 
cerrar=function(){
    
q('capa').style.top='-1500px';
}
onload=function(){
    
q('abre').onclick=abrir;
    
q('bot').onclick=cerrar;
}
onresize=cerrar;
</script>
</head>

<body>
<div id="abre">abrir</div>
<div id="capa"><div id="close"><div id="bot">x</div></div><iframe id="ifr" width="800" height="600" src="http://www.google.com"></iframe></div>
</body>
</html> 
Igualmente, tal como sucede en un popup, siempre pueden usar la opción abrir en una nueve ventana, de modo que no sé que tanto sirvan ambas alternativas.

Última edición por Panino5001; 30/09/2008 a las 14:35