Ver Mensaje Individual
  #11 (permalink)  
Antiguo 22/08/2005, 13:54
Avatar de derkenuke
derkenuke
Colaborador
 
Fecha de Ingreso: octubre-2003
Ubicación: self.location.href
Mensajes: 2.665
Antigüedad: 21 años, 4 meses
Puntos: 45
document.layers no existe mas que en Netscape. No lo probé en mozilla, ya me puedes perdonar.

Creo que me he cargado ahora que funcione en Netscape, no lo tengo instalado en esta máquina. Si puedes probarlo me dices. Funciona en Firefox 1.0.6 y en Opera 8.1 (en IE6 tambien).

Código PHP:
<html

<
head
<
title>Pag1</title
<
style
    .
elemento li
        
positionabsolute
        
left:55px
        
width:300px
        
float:left
        
clear:both
        
cursor:move
        
padding:2px
        
border1px solid #ccc; 
        
background-color#eee; 
        
list-style-typenone;
    } 
</
style
</
head

<
body
<
script LANGUAGE="JavaScript"
    
/* DRAG & DROP */ 
    // Original:  Randy Bennett ([email protected]
    // Web Site:  http://home.thezone.net/~rbennett/sitemap.htm 
    // (modificado) 
    
= (document.all) ? 1
    var 
ob,X,Y
    
document.onmousedown=function(e) { 
        if (
N) {
            
ob document.getElementById(e.target.id).style
            
Y=e.clientY-parseInt(ob.top);
        }
        else {
            
ob event.srcElement.style
            
Y=event.offsetY;
        }
        return 
false;
    } 
    
document.onmousemove=function(e) { 
        if (
ob) { 
            if (
N)
                
ob.top=(e.clientY-Y)+"px";
            else
                
ob.pixelTop = (event.clientY-Y+document.body.scrollTop); 
              return 
false;
        } 
    } 
    
document.onmouseup=function() { 
        
ob null
    } 
     
    if (
N
        
document.captureEvents(Event.MOUSEDOWN Event.MOUSEMOVE Event.MOUSEUP); 


</script> 


<ul class="elemento"> 
    <li id="uno" style="top:5px;">uno</li> 
    <li id="dos" style="top:30px;">dos</li> 
    <li id="tres" style="top:55px;">tres</li> 
    <li id="cuatro" style="top:80px;">cuatro</li> 
    <li id="cinco" style="top:105px;">cinco</li> 
    <li id="seis" style="top:130px;">seis</li> 
</ul> 


</body> 

</html> 
Ademas le he quitado los puntos de la lista, que me parecia que quedaban feos ;P

A ver si funciona en Netscape..
__________________
- Haz preguntas inteligentes, y obtendrás más y mejores respuestas.
- Antes de postearlo Inténtalo y Búscalo.
- Escribe correctamente tus mensajes.