Hi I havent use javascript and prototype in a while so maybe i am doing something really wrong. So here is what I am trying to do with prototype I have a a few places in my page with a set of to divs divs, lista_izq and lista_der, with a list inside list_izq <div class="lista_izq"> <ul> <li><div class="text">text1</div> <div class="hidden_text">hidden1</div> </li> <li><div class="text">text2</div> <div class="hidden_text">hidden2</div> </li> </ul> </div> <div class="lista_der"> </div>
So when ever the mouse is over the text1 or text2. The hidden text appears on the second . I use firefox so I did all the testing there. It worked but when i tested on opera, IE, and konqueror it didnt. It is really anoying tracing bugs in other browsers without firebug. Anyhow here is my code for each node Event.observe(titulo, 'mouseover', function(e) { reemplazarX(e); }); Event.observe(titulo, 'mouseout', function(e) { borrar(e); }); and this my functions function reemplazarX(e){ alert(e); alert(e.element); alert(e.element()); var element = e.element(); alert("s"); var e2 =element.getOffsetParent(element); alert("t"); //e2.childElements()[2].setStyle('backgroundColor', blue); alert(element); alert("xx"); e2.childElements()[2].setStyle({ backgroundColor: '#020506', opacity: 1.0, borderLeft:'1px #FFF solid' }); e2.childElements()[2].innerHTML= element.next().innerHTML; } function borrar(e,lista_der){ var element = e.element(); var e2 =element.getOffsetParent(element); e2.childElements()[2].innerHTML= ""; e2.childElements()[2].setStyle({ backgroundColor: '#000', opacity: 0.0 }); } I did all those "Trace" to narrow down the problem and it comes down to e.element. In opera it returns undefine with e.element and it dies when i use e.element(). Like if the function didnt. Exists. I assing each function with to titulo=lista_izq[j].childElements()[0]; with a FOR loop. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---