Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/08/2003, 16:40
Xerach
 
Fecha de Ingreso: agosto-2003
Mensajes: 4
Antigüedad: 21 años, 6 meses
Puntos: 0
Aqui va tu Menú

Prueba esto espero te ayude a tu proposito.
La primera parte va entre la etiquetas head y la segunda en body en medio del script veras que te lo dice.

<!--->
<link rel=stylesheet href=./index.css type=text/css>
<script language=JavaScript>
<!--
content = new Array ();

content [0] = new Array (
false,
new Array('sub_0_1','sub_0_2','sub_0_3')
);
content [1] = new Array (
false,
new Array('sub_1_1','sub_1_2','sub_1_3')
);
content [2] = new Array (
false,
new Array('sub_2_1','sub_2_2','sub_2_3')
);

isOPERA = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
isIE = (document.all && !isOPERA)? true : false;
isDOM = (document.getElementById && !isIE && !isOPERA)? true : false;

function processTree (id)
{
if (content [id][0])
{
for (i = 0; i < content [id][1].length; i++)
hide (content [id][1][i]);

content [id][0] = false;
}
else
{
for (i = 0; i < content [id][1].length; i++)
show (content [id][1][i], 'table-row');

content [id][0] = true;
}

return false;
}

function show (id, displayValue)
{
if (isDOM)
document.getElementById(id).style.display = (displayValue)? displayValue : "block";
else if (isIE)
document.all[id].style.display = "block";
}

function hide (id)
{
if (isDOM)
document.getElementById(id).style.display = "none";
else if (isIE)
document.all[id].style.display = "none";
}
if (isDOM || isIE)
{
document.writeln('<style type="text/css">');
document.writeln('.SubItemRow \{ display: none; \}');
document.writeln('</style>');
}

// -->
</script>
<!--Pegar el codigo de arriba en el head tags-->
<!--pegar el codigo siguiente en el body tags-->
<table width=150 height=40 border=0 cellpadding=0 cellspacing=1>
<tr>
<td width=1 class=Item>+</td>
<td width=149 height=20 class=Item><a href=./ class=Item onClick="processTree (0); return false;">Luego lo modificas a tu gusto o añades mas links</a></td>
</tr>
<tr id='sub_0_1' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo1</a></td>
</tr>
<tr id='sub_0_2' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo2</a></td>
</tr>
<tr id='sub_0_3' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo3</a></td>
</tr>
<tr>
<td width=1 class=Item>+</td>
<td width=149 height=20 class=Item><a href=./ class=Item onClick="processTree (1); return false;">modifica colores etc...</a></td>
</tr>
<tr id='sub_1_1' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo1</a></td>
</tr>
<tr id='sub_1_2' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo2</a></td>
</tr>
<tr id='sub_1_3' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo3</a></td>
</tr>
<tr>
<td width=1 class=Item>+</td>
<td width=149 height=20 class=Item><a href=./ class=Item onClick="processTree (2); return false;">Espero sea lo que buscas</a></td>
</tr>
<tr id='sub_2_1' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo1</a></td>
</tr>
<tr id='sub_2_2' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo2</a></td>
</tr>
<tr id='sub_2_3' class=SubItemRow>
<td width=10>&nbsp;</td>
<td width=149 height=20 class=SubItem><a href="http://www.loquesea">titulo3</a></td>
</tr>
</table>