·
miarroba.com
Ayuda menu desplegable!!
 
Índice de subforos · Ayuda para webmasters · Java y Javascript
Noticias · Buscar · Tags · Tagboard · Usuarios · Fisgona
Autor Mensaje 
cascoporrillocascoporrillo
Usuario Novato
Usuario Novato


Mensajes: 10
Desde: 22/Nov/2005
#1 ·
 Ayuda menu desplegable!!

hola tengo un problema. he copiado un codigo para hacer un menu desplegable pero resulta q emerge hacia abajo y m gustaria q emergiera hacia la izquierda, ademas de una solucion para quitar el borde azul de hipervinculo que trae puesto. necesito ayuda pk de javascript se lo justo pa pasar la tarde. para kien me pueda ayudar pongo aki el codigo:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Actividades</title>

<style type="text/css">

#dropmenudiv
{
position: absolute;
border:0px solid black;
font:normal 12px Arial;
line-height:20px;
z-index: 50%;
}



#dropmenudiv a
{ /*Este es el menú cuando aparece*/
border: 1px solid #ffffff;
width: 215px; height:30px;
display: block;
text-indent: 10px;
color: #ffffff;
font-weight: bold;
text-decoration: none;
margin: 0px 0px 0px 0px;
color-margin: #E6E600;
border-color: #ffffff;
}



#dropmenudiv a:hover
{ /*color de las opciones cuando el usuario está sobre la opción*/
background-color: #ffffff;
color:#99CC00;
border-color: #ffffff;
}
</style>



<script type="text/javascript">

//Contents for menu 1

var menu1=new Array()
menu1[0]='<a href="aerobic.htm">Aerobic/Batuka</a>'
menu1[1]='<a href="salon.htm">Bailes de salón</a>'
menu1[2]='<a href="latinos.htm">Bailes latinos</a>'
menu1[3]='<a href="vientre.htm">Danza del vientre</a>'
menu1[4]='<a href="clasica.htm">Danza clásica</a>'
menu1[5]='<a href="contemporanea.htm">Danza contemporánea</a>'
menu1[6]='<a href="funky.htm">Funky hip-hop</a>'
menu1[7]='<a href="mantenimiento.htm">Gimnasia de mantenimiento</a>'
menu1[8]='<a href="pilates.htm">Pilates</a>'
menu1[9]='<a href="taichi.htm">Tai chi</a>'
menu1[10]='<a href="teatro.htm">Teatro</a>'
menu1[11]='<a href="yoga.htm">Yoga</a>'


var menuwidth='65px' //default menu width

var menubgcolor='#000000' //menu bgcolor

var disappeardelay=50 //menu disappear speed onMouseout (in miliseconds)

var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed



var ie4=document.all

var ns6=document.getElementById&&!document.all



if (ie4||ns6)

document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')



function getposOffset(what, offsettype){

var totaloffset=(offsettype=="left"Giño? what.offsetLeft : what.offsetTop;

var parentEl=what.offsetParent;

while (parentEl!=null){

totaloffset=(offsettype=="left"Giño? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;

parentEl=parentEl.offsetParent;

}

return totaloffset;

}





function showhide(obj, e, visible, hidden, menuwidth){

if (ie4||ns6)

dropmenuobj.style.left=dropmenuobj.style.top=-500

if (menuwidth!=""Giño{

dropmenuobj.widthobj=dropmenuobj.style

dropmenuobj.widthobj.width=menuwidth

}

if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"Giño

obj.visibility=visible

else if (e.type=="click"Giño

obj.visibility=hidden

}



function iecompattest(){

return (document.compatMode && document.compatMode!="BackCompat"Giño? document.documentElement : document.body

}



function clearbrowseredge(obj, whichedge){

var edgeoffset=0

if (whichedge=="rightedge"Giño{

var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15

dropmenuobj.contentmeasure=dropmenuobj.offsetWidth

if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)

edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth

}

else{

var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18

dropmenuobj.contentmeasure=dropmenuobj.offsetHeight

if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)

edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight

}

return edgeoffset

}



function populatemenu(what){

if (ie4||ns6)

dropmenuobj.innerHTML=what.join(""Giño

}





function dropdownmenu(obj, e, menucontents, menuwidth){

if (window.event) event.cancelBubble=true

else if (e.stopPropagation) e.stopPropagation()

clearhidemenu()

dropmenuobj=document.getElementById? document.getElementById("dropmenudiv"Giño : dropmenudiv

populatemenu(menucontents)



if (ie4||ns6){

showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left"Giño

dropmenuobj.y=getposOffset(obj, "top"Giño

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge"Giño+"px"

dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge"Giño+obj.offsetHeight+"px"

}



return clickreturnvalue()

}



function clickreturnvalue(){

if (ie4||ns6) return false

else return true

}



function contains_ns6(a, b) {

while (b.parentNode)

if ((b = b.parentNode) == a)

return true;

return false;

}



function dynamichide(e){

if (ie4&&!dropmenuobj.contains(e.toElement))

delayhidemenu()

else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

delayhidemenu()

}



function hidemenu(e){

if (typeof dropmenuobj!="undefined"Giño{

if (ie4||ns6)

dropmenuobj.style.visibility="hidden"

}

}



function delayhidemenu(){

if (ie4||ns6)

delayhide=setTimeout("hidemenu()",disappeardelay)

}



function clearhidemenu(){

if (typeof delayhide!="undefined"Giño

clearTimeout(delayhide)

}



if (hidemenu_onclick=="yes"Giño

document.onclick=hidemenu



</script>

</head>



<body>

<p><a href="actividades.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '215px')" onMouseout="delayhidemenu()"><img src="../images/web/buttons/boton_activ1.png" alt="Actividades" width="261" height="30" /></a></p>
</body>
</html>


muchas gracias de antemano.

SoRonTo

02/Ago/2006 17:28 GMT+1
Índice de subforos · Ayuda para webmasters · Java y Javascript
Temas similares
Asunto Autor#VisitasÚltima respuesta
Ayuda con MENU desplegable!03/Jun/2008, 05:27
bubuosoriobubuosorio
0325No hay respuestas
Ayuda con menu desplegable06/Abr/2008, 11:19
ojosaltonojosalton
398807/Abr/2008, 20:59
chavpchavp Ir al último mensaje del tema
Ayuda urgente! links menu desplegable16/Feb/2005, 20:21
Gema_1902Gema_1902
52.72118/Feb/2005, 19:03
jallmalatestajallmalatesta Ir al último mensaje del tema
Menu desplegable horizontal14/Jun/2007, 18:33
JaorcorJaorcor
43.49227/Jun/2007, 15:40
chavpchavp Ir al último mensaje del tema
Menú desplegable que abra nueva ventana11/Feb/2007, 13:00
AlimauAlimau
61.26212/Feb/2007, 15:31
AlimauAlimau Ir al último mensaje del tema
Opciones:
Versión imprimible del tema
Subscríbete a este tema
Date de baja de este tema
Ir al subforo:  

TU NO PUEDES Escribir nuevos temas en este foro
TU NO PUEDES Responder a los temas en este foro
TU NO PUEDES Editar tus propios mensajes en este foro
TU NO PUEDES Borrar tus propios mensajes en este foro
Todas las fechas y horas son GMT+1. Ahora son las 04:57
Miarroba Networks, S.L. C/ 18 de Julio, 21 Bajo, 39610 Astillero (CANTABRIA) - CIF B-39512736
Inscrita en el Registro Mercantil de Cantabria, tomo 743, folio 161, libro 0, hoja S-12428, Instripción 1ª