Foros del Web » Programando para Internet » Javascript »

Problema para cerrar una ventana - Ayudenme por favor...

Estas en el tema de Problema para cerrar una ventana - Ayudenme por favor... en el foro de Javascript en Foros del Web. Saludos a todos los que esten leyendo esto: Haber si me pueden ayudar con este problemita que tengo que les detallo a continuación: Tengo este ...
  #1 (permalink)  
Antiguo 14/11/2008, 14:51
Avatar de carlospc  
Fecha de Ingreso: noviembre-2008
Ubicación: Huancayo/Perú
Mensajes: 240
Antigüedad: 15 años, 5 meses
Puntos: 12
Problema para cerrar una ventana - Ayudenme por favor...

Saludos a todos los que esten leyendo esto: Haber si me pueden ayudar con este problemita que tengo que les detallo a continuación:

Tengo este código de Java Script que lo que hace es simular mostrar un PopUp en la ventana, dicho PopUp no es mas que una tablita dentro de un DIV, este div es quien en realidad posee la animacion hecha en java script, que se muestra lineas mas abajo... Mi problema es... "Como aria para cerrar este DIV, para que el Supuesto PopUp deje de molestar al usuario, y de paso para que no me este tapando la pagina principal todo el rato...." ahi les mando el code, ayudenme por favor..... y gracias de antemano.... a y haber si me pueden ayudar a hacerlo compatible con Firefox... solo funciona en IE

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>COMO LO CIERRO - HELPME...!!!</title>
</head>

<body>

<DIV id=down style="z-index:1!important; z-index:2; LEFT: 898px; WIDTH: 90px; POSITION: absolute; TOP: 150px; HEIGHT: 90px">
<table id=tablita width="110" border="1" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td><a href="http://www.google.com.pe/" target="_blank">LINK 02</a></td>
</tr>
<tr>
<td><a href="http://www.huancayocaliente.com/" target="_blank">LINK 01</a></td>
</tr>
<tr>
<td><a href="http://www.google.com.pe/" target="_blank">LINK 02</a></td>
</tr>
<tr>
<td onClick="tablita.close()">SALIR</td>
</tr>
</table>
</DIV>

<SCRIPT language=javascript>
down.style.left = Math.ceil((screen.availWidth-1002)/2) + 1002 - 120;
//html_container.offsetLeft + html_container.offsetWidth - 90;
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;

var tmp1= tmp2= tmp3 =0;
tmp1 = document.body.clientHeight;
function heartBeat() {

tmp2 = document.body.clientHeight;
if(tmp1 != tmp2){
tmp3 = tmp2 - tmp1;
tmp1 = tmp2;
if(tmp3<0){}
}
if(IE) {
diffY = document.body.scrollTop;
diffX = 0;
}

if(NS) {
diffY = self.pageYOffset;
diffX = self.pageXOffset; }

if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);

if(percent > 0)
percent = Math.ceil(percent);
else
percent = Math.floor(percent);

if(IE)
document.all.down.style.pixelTop += percent;
if(NS)
document.down.top += percent;

lastScrollY = lastScrollY + percent;
}

if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);

if(percent > 0)
percent = Math.ceil(percent);
else
percent = Math.floor(percent);

if(IE) document.all.down.style.pixelLeft += percent;
if(NS) document.down.top += percent;
lastScrollY = lastScrollY + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat()",1);
</SCRIPT>

</body>

<table width="150" height="200%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>

</html>
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 11:23.