[thelist] Mozilla: delete dynamically a <div>: display, visibility or innerHTML?
Delcambre Laurent
Laurent.Delcambre at insa-lyon.fr
Tue Jul 26 03:14:41 CDT 2005
Hello,
I've got a menu. When you hover a row this displays a sublevel menu between the
first row and the second row(I don't want a menu with the sub-levels on the
right side of the menu!). I've tried many methods:
- document.getElementById('something').innerHTML = '' when you hover another
row
document.getElementById('something').innerHTML = '<a href="jlj">lien</a>' when
you hover on the row.
OR
- document.getElementById('something').style.display = "block" or display=
"none"
OR
- document.getElementById('something').style.visibility="visible" or
visibility="hidden".
I've also tried to put the display AND the visibility tag!
EVERYTHING works fine with IE.Nothings works with Firefox - > it moves down the
second row but when you hover another row it makes a white square. It makes the
same on Opera.
An idea?
ex:
<div class="menuItem"><a href="#" onMouseOver='hideSousMenu()'
onClick='document.TreeviewRedirect.submit()'> Documents</a></div>
<div class="menuItem">
<a href="#" onMouseOver='affSousMenu()'>
Recherche
</a>
<div id='sousMenu' class='sousMenuStyle'></div>
</div>
<div class="menuItem"><a href="#" onMouseOver='hideSousMenu()'
onClick='document.TelechargerRedirect.submit()'> Télécharger</a></div>
function affSousMenu(){
if(document.getElementById){
with(document.getElementById('sousMenu')){
innerHTML=txtAInserer;
}
}
}
function hideSousMenu(){
if(document.getElementById){
document.getElementById('sousMenu').innerHTML="";
}
}
More information about the thelist
mailing list