Foros del Web » Programando para Internet » Javascript »

Menu desplegable

Estas en el tema de Menu desplegable en el foro de Javascript en Foros del Web. Hola, cómo hago para crear un menu similar al que se muestra en esta web ? (ver ejemplo al final de la página) He leido ...
  #1 (permalink)  
Antiguo 04/07/2006, 19:54
Avatar de causita  
Fecha de Ingreso: mayo-2002
Ubicación: Lima-Perú
Mensajes: 2.043
Antigüedad: 22 años
Puntos: 8
Exclamación Menu desplegable

Hola, cómo hago para crear un menu similar al que se muestra en esta web? (ver ejemplo al final de la página)

He leido lo q dice ahi pero no logro entenderlo.

Gracias
__________________
|| no hay pregunta tonta....lo q hay son tontos q no preguntan || d-.-b

El Causita
  #2 (permalink)  
Antiguo 15/09/2006, 15:48
 
Fecha de Ingreso: septiembre-2006
Ubicación: Buenos Aires
Mensajes: 53
Antigüedad: 17 años, 7 meses
Puntos: 0
Aqui tienes un menu desplazable, espero que te sirva:

<!-- Colocar dentro de la etiqueta <HEAD> -->

<script language="JavaScript1.2">

function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};

function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20 }
else {eval(document.object1.top=eval(window.pageYOffset +20));}
setTimeout("makeStatic()",0);}
</script>

<style>
<!--

.hl {
Background-Color : yellow;
Cursor:hand;
}
.n {
Cursor:hand;
}
-->
</style>

<!-- Colocar dentro de la etiqueta <BOBY> -->


<LAYER visibility="hide" top="20" name="object1" bgcolor="black" left="0" onmouseover="move(132)" onmouseout="move(-132)">

<script language="JavaScript1.2">

function positionmenu(){
move(-132)
}

if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand; Position : Absolute ;Left : 0px ;Top : 20px ;Z-Index : 20" onmouseover="move(132)" onmouseout="move(-132)">')}
</script>

<table border="0" cellpadding="0" cellspacing="1" width="150" bgcolor="#000000">
<tr><td bgcolor="#0099FF"> <font size="4" face="Arial"><b>Menu</b></font></td>

<script language="JavaScript1.2">
document.write('<td align="center" rowspan="100" width="16" bgcolor="#FF6666"><span style="font-size:13px"><p align="center"><font face="Arial Black">M<br>E<br>N<BR>U</font></p></span></TD>')
</script>

</tr>

<script language="JavaScript1.2"><!--
if (document.all||document.layers) {
makeStatic();}

var text=new Array();
var thelink=new Array();

//configura aqui los enlaces - en los text los textos, en thelink su correspondiente link

text[0]="inicio";
text[1]="Promocion de páginas webs";
text[2]="Servicios de Webs";
text[3]="Servicios para visitantes";
text[4]="Publicidad para ganar con tu web";
text[5]="Descargas de programas gratis";
text[6]="Codigos JavaScript";

thelink[0]="direccion url 1";
thelink[1]="direccion url 2";
thelink[2]="direccion url 3";
thelink[3]="direccion url 4";
thelink[4]="direccion url 5";
thelink[5]="direccion url 6";
thelink[6]="direccion url 7";

//Aqui se configura el target, pero solo son validos '' (el mismo marco), 'new' (nueva ventana), or 'framename' (el mismo frame)
var linktarget='new'

///A PARTIR DE AQUI NO TOCAR NADA////////////////

function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}

for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=20 bgcolor=white onclick="navigateie('+i+')" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL>&nbsp;'+text[i]+'</FONT></TD></TR>')}
else {document.write('<TR><TD bgcolor="white"><ILAYER><LAYER HEIGHT="18" onmouseover="this.bgColor=\'yellow\'" onmouseout="this.bgColor=\'white\'" width=131><FONT SIZE=2 FACE=ARIAL>&nbsp;<A HREF="'+thelink[i]+'" target="'+linktarget+'" id="nounderline">'+text[i]+'</A></FONT></LAYER></ILAYER></TD></TR>')}

//-->
</script>
<tr>
<td bgcolor="#0099FF"><font size="1" face="Arial"> </font></td>
</TR>
</table>
<script language="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</script>
</LAYER>
  #3 (permalink)  
Antiguo 15/09/2006, 15:53
 
Fecha de Ingreso: septiembre-2006
Ubicación: Buenos Aires
Mensajes: 53
Antigüedad: 17 años, 7 meses
Puntos: 0
Si antes de Probarlo quieres ver un ejemplo de como se ve ese menu, entra a mi pagina que lo vas a ver a la izquierda http://www.paginalpedo.4t.com/video
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 03:00.