Foros del Web » Programando para Internet » Javascript »

Corrección en código

Estas en el tema de Corrección en código en el foro de Javascript en Foros del Web. El siguiente código me lo pasaron y no se como hacer algo que me pide el cliente: En la página aparece un menú del lado ...
  #1 (permalink)  
Antiguo 17/09/2007, 07:53
Avatar de gmaciel  
Fecha de Ingreso: marzo-2005
Mensajes: 391
Antigüedad: 19 años, 1 mes
Puntos: 4
Corrección en código

El siguiente código me lo pasaron y no se como hacer algo que me pide el cliente:

En la página aparece un menú del lado izquierdo que a su vez abre un submenú al pasar el cursor por encima. El sub menú cambia de tonalidad para saber cuál es el enlace que buscamos.

Qué debo modificar para que el menú también cambie de color al pasar el cursor, las letras del menú son blancas y quisiera que cambiaran a amarillas.

Gracias de antemano por la ayuda.

El código es el siguiente:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Pagina nueva 2</title>
<base target="_self">
<style type="text/css">

#popitmenu{
position: absolute;
background-color: white;
border:2px solid #990000;
font: normal 12px Arial;
line-height: 18px;
z-index: 100;
visibility: hidden;
}

#popitmenu a{
text-decoration: none;
padding-left: 6px;
color: black;
display: block;
}

#popitmenu a:hover{ /*hover background color*/
background-color: #c0c0c0;
}

</style>

<script type="text/javascript">



var defaultMenuWidth="150px" //set default menu width.

var linkset=new Array()


linkset[0]='<a href="corte_soldar.htm">Eqs. Corte y Soldar y Cortar</a>'
linkset[0]+='<a href="tortuguitas.htm">Tortuguitas</a>'
linkset[0]+='<a href="pantografos.htm">Pantógrafos</a>'
linkset[0]+='<a href="eq_portatiles.htm">Eqs. Portátiles con Cilindros</a>'
linkset[0]+='<a href="cilindros.htm">Cilindros Solos</a>'


var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY

var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY

if (rightedge<menuobj.contentwidth)

menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else

menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"

if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {

while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu

</script>
</head>

<body topmargin="0" leftmargin="0">

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="780" height="182">
<tr>
<td width="149" height="151" bgcolor="#990000" valign="top" rowspan="3" align="justify">
&nbsp;<p align="center">
<img border="0" src="imagenes/logo_chico_fondo_rojo.jpg" width="121" height="103"></p>
<p style="margin-left: 12; margin-top: 0; margin-bottom: 0">
<font face="Arial">
<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()" style="text-decoration: none">
<font size="2" color="#FFFFFF">Oxicorte</font></font></a><font size="2" color="#FFFFFF"></font></font></font><font face="Arial"><font size="2"><font color="#FFFFFF"><br>
</font>

<p style="margin-left: 12; margin-top: 0; margin-bottom: 0">
&nbsp;</p>
<p style="margin-left: 12; margin-top: 0; margin-bottom: 0">
&nbsp;</p>
<p style="margin-left: 12; margin-top: 0; margin-bottom: 0">
&nbsp;</p>
</td>
<td width="631" height="386" valign="top" background="imagenes/fondo_amarillo.jpg" rowspan="3">
<p align="center">&nbsp;</td>
<td width="10" height="158" background="imagenes/fondo_celdas.jpg">&nbsp;</td>
</tr>
<tr>
<td width="10" height="149" background="imagenes/fondo_celdas.jpg">&nbsp;</td>
</tr>
<tr>
<td width="10" height="79" background="imagenes/fondo_celdas.jpg">&nbsp;</td>
</tr>
<tr>
<td width="775" height="19" colspan="2" bgcolor="#000000">
<p style="margin-top: 0px; margin-bottom: 0px" align="center">
<font face="Arial" size="1" color="#FFFFFF">AJH</font><font color="#FFFFFF"><font face="Arial"><font size="1"> 2007 © DERECHOS RESERVADOS</font><span style="font-size: 7pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font style="font-size: 7pt" face="Arial">LAS MARCAS QUE
APARECEN EN ESTE SITIO SON MARAS REGISTRADAS POR SUS
PROPIETARIOS</font></font></td>
<td width="10" height="19" background="imagenes/fondo_celdas.jpg">&nbsp;</td>
</tr>
<tr>
<td width="785" height="12" colspan="3">
<img border="0" src="imagenes/fondo_celdas_inf.jpg" width="790" height="12"></td>
</tr>
</table>
<script type="text/javascript" src="activateActiveX.js"></script>
</body>

</html>
  #2 (permalink)  
Antiguo 17/09/2007, 08:32
Avatar de marcopoloaz06  
Fecha de Ingreso: julio-2007
Ubicación: México
Mensajes: 457
Antigüedad: 16 años, 9 meses
Puntos: 11
Re: Corrección en código

Si te entendi a mi salio esto
http://polopolomp.6te.net/lol.html
si no es asi dime ke ezo te entendi XD
__________________
Aerolíneas Alicia :D
  #3 (permalink)  
Antiguo 17/09/2007, 08:43
Avatar de gmaciel  
Fecha de Ingreso: marzo-2005
Mensajes: 391
Antigüedad: 19 años, 1 mes
Puntos: 4
Re: Corrección en código

Exactamente eso es lo que buscaba, muchas gracias

Saludos

GM
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 01:13.