Foros del Web » Programando para Internet » Javascript »

FolderTree!

Estas en el tema de FolderTree! en el foro de Javascript en Foros del Web. Hola Foreros! Por favor me podrian facilitar el codigo de un arbol, como el explorador de windows. Gracias de antemano....
  #1 (permalink)  
Antiguo 20/03/2002, 17:46
Avatar de biblio  
Fecha de Ingreso: enero-2002
Ubicación: Urano
Mensajes: 577
Antigüedad: 22 años, 3 meses
Puntos: 0
FolderTree!

Hola Foreros!
Por favor me podrian facilitar el codigo de un arbol, como el explorador de windows.

Gracias de antemano.
  #2 (permalink)  
Antiguo 20/03/2002, 23:59
Avatar de Aleph  
Fecha de Ingreso: agosto-2001
Ubicación: Kenolandia
Mensajes: 1.061
Antigüedad: 22 años, 8 meses
Puntos: 3
Re: FolderTree!

Que es exactamente lo que queres hacer? Porque si pensas en acceder a los archivos y directorios con JavaScript, estas en el foro equivocado.

Saludos.

<div style="text-align:right">Guerrillero del ERF</div>
  #3 (permalink)  
Antiguo 21/03/2002, 16:51
Avatar de biblio  
Fecha de Ingreso: enero-2002
Ubicación: Urano
Mensajes: 577
Antigüedad: 22 años, 3 meses
Puntos: 0
Re: FolderTree!

Lo que quiero construir es algo que se parezca al explorador de windows. como las carpetitas y su contenido. espero que puedan decirme como.
  #4 (permalink)  
Antiguo 21/03/2002, 17:06
Avatar de adex  
Fecha de Ingreso: marzo-2002
Ubicación: Lima, Perú, América Latina
Mensajes: 445
Antigüedad: 22 años, 1 mes
Puntos: 0
Re: FolderTree!

aqui va uno, a mi modesto entender creo que es este lo que necesitas.....
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;tu ejemplo&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;

body {
margin: 0px;
}

#menuBar {
background-color: #c0c0c0;
border-style: solid;
border-width: 0px;
border-top-color: #f0f0f0;
border-top-width: 2px;
border-bottom-color: #909090;
border-bottom-width: 2px;
color: #000000;
padding: 0px;
padding-top: 2px;
padding-bottom: 2px;
position: absolute;
left: 0px;
top: 0px;
text-align: left;
// aquí especificas el ancho que ocupa en la página
width: 20%;
z-index: 20;
}

a.menuButton, a.menuButtonActive {
border-style: solid;
border-width: 1px;
border-color: #c0c0c0;
color: #000000;
cursor: default;
font-family: &quot;MS Sans Serif&quot;, Arial, Tahoma, sans-serif;
font-size: 8pt;
font-style: normal;
font-weight: normal;
padding: 2px;
padding-left: 6px;
padding-right: 6px;
position: relative;
left: 0px;
top: 0px;
text-decoration: none;
}

a.menuButton:hover {
border-color: #f0f0f0 #505050 #505050 #f0f0f0;
color: #000000;
}

a.menuButtonActive, a.menuButtonActive:hover {
background-color: #909090;
border-color: #505050 #f0f0f0 #f0f0f0 #505050;
color: #ffffff;
left: 1px;
top: 1px;
}

.menu {
background-color: #c0c0c0;
border-style: solid;
border-width: 2px;
border-top-color: #f0f0f0;
border-right-color: #909090;
border-bottom-color: #909090;
border-left-color: #f0f0f0;
padding: 0px;
position: absolute;
text-align: left;
visibility: hidden;
z-index: 101;
}

a.menuItem {
color: #000000;
cursor: default;
display: block;
font-family: &quot;MS Sans Serif&quot;, Arial, Tahoma,sans-serif;
font-size: 8pt;
font-style: normal;
font-weight: normal;
margin: 0px;
padding: 2px;
padding-left: 12px;
padding-right: 12px;
text-decoration: none;
white-space: nowrap;
}

a.menuItem:hover {
background-col
  #5 (permalink)  
Antiguo 21/03/2002, 17:15
Avatar de adex  
Fecha de Ingreso: marzo-2002
Ubicación: Lima, Perú, América Latina
Mensajes: 445
Antigüedad: 22 años, 1 mes
Puntos: 0
Re: FolderTree!

background-color: #000080;
color: #ffffff;
}

.menuItemSep {
border-bottom: 1px solid #f0f0f0;
border-top: 1px solid #909090;
margin: 3px 2px 3px 2px;
}

&lt;/style&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

// Determine browser and version. Script works for IE 5.5+ and NS 6.0+

function Browser() {

var ua, s, i;

this.isIE = false; // Internet Explorer
this.isNS = false; // Netscape
this.version = null;

ua = navigator.userAgent;

s = &quot;MSIE&quot;;
if ((i = ua.indexOf(s)) &gt;= 0) {
this.isIE = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}

s = &quot;Netscape6/&quot;;
if ((i = ua.indexOf(s)) &gt;= 0) {
this.isNS = true;
this.version = parseFloat(ua.substr(i + s.length));
return;
}
}

var browser = new Browser();

// For IE, adjust menu bar styling.

if (browser.isIE) {
document.styleSheets[document.styleSheets.length - 1].addRule(&quot;#menuBar&quot;, &quot;padding-top:4px&quot;);
document.styleSheets[document.styleSheets.length - 1].addRule(&quot;#menuBar&quot;, &quot;padding-bottom:3px&quot;);
}

// Global variable for tracking the currently active button.

var activeButton = null;

// Capture mouse clicks on the page so any active button can be
// deactivated.

if (browser.isIE)
document.onmousedown = pageMousedown;
if (browser.isNS)
document.addEventListener(&quot;mousedown&quot;, pageMousedown, true);

function pageMousedown(event) {

var className;

// If the object clicked on was not a menu button or item, close any
// active menu.

if (browser.isIE)
className = window.event.srcElement.className;
if (browser.isNS)
className = (event.target.className ?
event.target.className : event.target.parentNode.className);

if (className != &quot;menuButton&quot; &amp;&amp; className != &quot;menuItem&quot; &amp;&amp;
className != &quot;menuItemSep&quot; &amp;&amp; activeButton)
resetButton(activeButton);
}

function buttonClick(button, menuName) {

// Blur focus from the link to remove that an
  #6 (permalink)  
Antiguo 22/03/2002, 11:38
Avatar de biblio  
Fecha de Ingreso: enero-2002
Ubicación: Urano
Mensajes: 577
Antigüedad: 22 años, 3 meses
Puntos: 0
Re: FolderTree!

Puedes completar el codigo por favor.

function buttonClick(button, menuName) {
Gracias por tu colaboracion.
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 06:18.