Hola chicos.. tengo un problema con un codigo de ventana flotantes... el problema es que no las puedo borrar... o sea.. tengo una galeria de imagenes cuando pasas el mouse por arriba abre la ventana flotante y cuando haces mouseout la borra... hasta ahi esta bien... pero cuando paso el mouse rapido por toda la fila me agre la cantidad de imagenes por las que pase... y cuando saco el mouse me va borrando de a una a medida que voy pasando por otras imagenes...
Aca los codigos Este es el de la galeria que llama la funcion ventana_flotante ()
Código:
<!-- // COMIENZA EL CODIGO DE LA VENTANA FLOTANTE \\ -->
<%
ima = "/imagenes/" + Familia_Codigo + "_" + Articulo_Codigo + "gr.jpg"
%>
<script>
function nom<%=Contador%>(){
imagen = '<%=ima%>';
altImg = '<%=altImagen%>';
setTimeout('ventana_flotante()',500)
}
</script>
<td><a href="<%=linkPagina%>.html" onmouseover="javascript: prev = 'yes';setTimeout('nom<%=Contador%>()',000)" onmouseout="javascript: prev = 'no';setTimeout('quitarDiv()',200);"><img src="http://www.amighini.net/imagenes/<%=Familia_Codigo%>_<%=Articulo_Codigo%>.jpg" width="125" height="160" border="0">
<!-- // TERMINA EL CODIGO DE LA VENTANA FLOTANTE \\ -->
Aca los codigos de las funciones
Código:
<!--
function getMouseXY(e){
if (IE) { //para IE
tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop;
}
else { //para netscape
tempX = e.pageX;
tempY = e.pageY;
}
if (tempX < 0) {
tempX = 0;
}
if (tempY < 0) {
tempY = 0;
}
return true;
}
var prev;
function ventana_flotante(){
if (prev == "yes"){
var ima = "fondo.png";
var tabla_imagen = '<table width="336" border="0" cellpadding="0" cellspacing="0"> '+
'<tr> '+
'<th width="10" height="10" background="vf_sup_iz.png" scope="col"></th> '+
'<th width="2" height="10" background="vf_sup.png" scope="col"></th> '+
'<th width="2" height="10" background="vf_sup_der.png" scope="col"></th>'+
'<th width="10" height="10" background="vf_sup_der.png" scope="col"></th>'+
'</tr> '+
'<tr valign="middle"> '+
'<th width="10" height="2" background="vf_izq.png" scope="col"></th> '+
'<th width="2" height="2" align="left" valign="middle" bgcolor="#FFFFFF" scope="col"></th> '+
'<td width="312" height="2" bgcolor="#FFFFFF" scope="col"></td> '+
'<th width="2" height="2" bgcolor="#FFFFFF" scope="col"></th>'+
'<th width="10" height="2" background="vf_der.png" scope="col"></th>'+
'</tr> '+
'<tr>'+
'<td width="10" height="2" background="vf_izq.png"></td> '+
'<td width="312" height="33" align="left" valign="middle" bgcolor="#CCCCCC"><div align="left"> '+
'<table width="312" border="0" cellpadding="2">'+
'<tr>'+
'<td class="titprod" scope="col"><span>'+altImg+'</span></td>'+
'</tr>'+
'</table>'+
'</div></td>'+
'<td width="2" height="2" bgcolor="#FFFFFF"></td>'+
'<td width="10" height="2" background="vf_der.png"></td>'+
'</tr>'+
'<tr> '+
'<td width="10" height="10" background="vf_izq.png"></td> '+
'<th width="2" height="10" bgcolor="#FFFFFF"></th> '+
'<td width="312" valign="top bgcolor="#FFFFFF"><img src="'+imagen+'"width="312" height="245">'+
'<div id="Layer1" style="position:absolute; width:303px; height:24px; z-index:0; left:90px; top:270px; visibility: visible;" class="linkpie">Click on Thumbnails for more details</div></td>'+
'<td width="2" bgcolor="#FFFFFF"></td>'+
'<td width="10" background="vf_der.png"></td>'+
'</tr>'+
'<tr>'+
'<td width="10" height="2" background="vf_izq.png"></td>'+
'<th width="2" height="2" bgcolor="#FFFFFF"></th>'+
'<td width="312" height="2" bgcolor="#FFFFFF"></td>'+
'<td width="2" height="2" bgcolor="#FFFFFF"></td>'+
'<td width="10" height="2" background="vf_der.png"></td>'+
'</tr>'+
'<tr>'+
'<td width="10" height="10" background="vf_inf_iz.png"></td>'+
'<th width="2" height="10" background="vf_inf.png"></th>'+
'<td width="312" height="10" background="vf_inf.png"></td>'+
'<td width="2" height="10" background="vf_inf.png"></td>'+
'<td width="10" height="10" background="vf_inf_der.png"></td>'+
'</tr>'+
'</table>';
//creo el objeto div
var div_fl = document.createElement('DIV');
//le asigno que su posicion sera abosoluta
div_fl.style.position = 'absolute';
//le asigno el ide a la ventana
div_fl.id = 'Miventana';
//digo en que posicion left y top se creara a partir de la posicion del raton tempx tempy
div_fl.style.left = tempX + 'px';
div_fl.style.top = tempY + 'px';
//asigno el ancho del div pasado por parametro
div_fl.style.width = '336';
//asigno el alto del div pasado por parametro
div_fl.style.height = '265';
//digo con css que el borde sera de grosor 1px solido y de color negro
//asigno el color de fondo
//div_fl.style.backgroundImage = "url("+ima+")";
//el objeto añado a la estrutura principal el document.body
document.body.appendChild(div_fl);
//el mensaje pasado por parametro muestro dentro del div
div_fl.innerHTML = tabla_imagen;
}
}
function quitarDiv()
{
//creo el objeto del div
var mv = document.getElementById('Miventana');
//elimino el objeto
document.body.removeChild(mv);
}
-->
Espero que me puedan ayudar...