par
bins » 22 août 2005, 08:39
Voilà en fait le code :
<script language="JavaScript">
function ouvrir_menu(id)
{
document.getElementById(id).style.visibility='visible';
document.getElementById(id).style.display='block';
}
function fermer_menu(id)
{
document.getElementById(id).style.visibility='hidden';
document.getElementById(id).style.display='none';
}
</script>
<?php
//CONNEXION BASE DE DONNE
*******
********
*******
$reso = mysql_query("SELECT * FROM membre");
while ($ligne = mysql_fetch_array($query, MYSQL_NUM))
{
echo "<a href=\"index2.php?page=profil2&login=$ligne[0]\" onMouseOver=\"ouvrir_menu('$ligne[0]')\" onclick=\"fermer_menu('$ligne[0]')\">$ligne[0]</a><br>";
echo '<div style="z-index:500;width: 150; height: 40;border:1px solid;cursor:default;padding:3;background-color:#0ffeee;visibility:hidden;position:absolute;display:none" id="' . $ligne[0] . '"><a href=\"index.php?page=page&login=' . $ligne[0] . '\">$ligne[0]</a>';
echo '</div>';
}
?>
Le problème c'est quand je passe ma souris sur un membre puis je passe ma souris sur un autre membre j'ai deux menu !
En fait je cherche à cacher tout les autres menu quand l'un est affiché
Voilà en fait le code :
[php]<script language="JavaScript">
function ouvrir_menu(id)
{
document.getElementById(id).style.visibility='visible';
document.getElementById(id).style.display='block';
}
function fermer_menu(id)
{
document.getElementById(id).style.visibility='hidden';
document.getElementById(id).style.display='none';
}
</script>
<?php
//CONNEXION BASE DE DONNE
*******
********
*******
$reso = mysql_query("SELECT * FROM membre");
while ($ligne = mysql_fetch_array($query, MYSQL_NUM))
{
echo "<a href=\"index2.php?page=profil2&login=$ligne[0]\" onMouseOver=\"ouvrir_menu('$ligne[0]')\" onclick=\"fermer_menu('$ligne[0]')\">$ligne[0]</a><br>";
echo '<div style="z-index:500;width: 150; height: 40;border:1px solid;cursor:default;padding:3;background-color:#0ffeee;visibility:hidden;position:absolute;display:none" id="' . $ligne[0] . '"><a href=\"index.php?page=page&login=' . $ligne[0] . '\">$ligne[0]</a>';
echo '</div>';
}
?>[/php]
Le problème c'est quand je passe ma souris sur un membre puis je passe ma souris sur un autre membre j'ai deux menu !
En fait je cherche à cacher tout les autres menu quand l'un est affiché