[Roll Over] problème inexplicable
Résolu
Edouard
-
Edouard -
Edouard -
Salut à tous,
J'ai un bug sur un rollover.
J'ai fait ma page index.html sous dream et le rollover fonctionne.
Ensuite j'ai passé cette page en index.php et ai isolé le menu avec un include dans un fichier menuonglets.php. L'onglet ouvert estchoisi avec une variable $module passée dans l'url (index.php?module=mononglet).
depuis ça marche plus ! Sauf si j'appelle un module qui n'existe pas... Avis au pro de l'algorithmique...
Voici comment j'appelle le menu dans la page index.php :
...
<!--début barre de navigation -->
<? include ("menuonglets.php");?>
<!-- fin barre de navigation -->
...
Et voici le contenu de menuonglets.php :
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<? if (!isset($_REQUEST['module'])){
$module="actus";
}
else {
$module=$_REQUEST['module'];
}
?>
<? if ($module=="assoc"){
?>
<td> <img src="images/asso2.gif" alt="" name="association" width="129" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><a href="asso.php" target="_top" onClick="MM_nbGroup('down','group1','association','',1)" onMouseOver="MM_nbGroup('over','association','images/asso2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="images/asso.gif" alt="" name="association" width="129" height="59" border="0" onload=""></a> </td>
<?
}
?>
<? if ($module=="actus"){
?>
<td> <img src="images/actus2.gif" alt="" name="association" width="115" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><a href="actu.php" target="_top" onClick="MM_nbGroup('down','group1','actualite','',1)" onMouseOver="MM_nbGroup('over','actualite','images/actus2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="images/actus.gif" alt="" name="actualite" width="115" height="59" border="0" onload=""></a> </td>
<?
}
?>
...
</tr>
</table>
C'est l'onglet assoc qui ne fonctionne pas (le premier) mais si j'appelle un onglet inexistant (cf les tests if) comme 'associa' alors cela fonctionne. en le déplacant dans la page (2-3-4 ème position, ça ne change rien)
Merci d'avance pour votre aide.
J'ai un bug sur un rollover.
J'ai fait ma page index.html sous dream et le rollover fonctionne.
Ensuite j'ai passé cette page en index.php et ai isolé le menu avec un include dans un fichier menuonglets.php. L'onglet ouvert estchoisi avec une variable $module passée dans l'url (index.php?module=mononglet).
depuis ça marche plus ! Sauf si j'appelle un module qui n'existe pas... Avis au pro de l'algorithmique...
Voici comment j'appelle le menu dans la page index.php :
...
<!--début barre de navigation -->
<? include ("menuonglets.php");?>
<!-- fin barre de navigation -->
...
Et voici le contenu de menuonglets.php :
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<? if (!isset($_REQUEST['module'])){
$module="actus";
}
else {
$module=$_REQUEST['module'];
}
?>
<? if ($module=="assoc"){
?>
<td> <img src="images/asso2.gif" alt="" name="association" width="129" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><a href="asso.php" target="_top" onClick="MM_nbGroup('down','group1','association','',1)" onMouseOver="MM_nbGroup('over','association','images/asso2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="images/asso.gif" alt="" name="association" width="129" height="59" border="0" onload=""></a> </td>
<?
}
?>
<? if ($module=="actus"){
?>
<td> <img src="images/actus2.gif" alt="" name="association" width="115" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><a href="actu.php" target="_top" onClick="MM_nbGroup('down','group1','actualite','',1)" onMouseOver="MM_nbGroup('over','actualite','images/actus2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="images/actus.gif" alt="" name="actualite" width="115" height="59" border="0" onload=""></a> </td>
<?
}
?>
...
</tr>
</table>
C'est l'onglet assoc qui ne fonctionne pas (le premier) mais si j'appelle un onglet inexistant (cf les tests if) comme 'associa' alors cela fonctionne. en le déplacant dans la page (2-3-4 ème position, ça ne change rien)
Merci d'avance pour votre aide.
A voir également:
- [Roll Over] problème inexplicable
- Start pxe over ipv4 - Forum Windows 10
- Erreur boot - start pxe over ipv4 on mac - Forum Windows
- Start PXE over IPv4 - Forum Windows 10
- Usb device over current status detected - Forum Matériel & Système
- Hand over to airline traduction ✓ - Forum Consommation & Internet
2 réponses
Salut et merci pour l'aide, même si je viens de trouver une solution (un peu lourde mais assez clean je crois)
J'ai fait des fonctions JS qui me permettent de poster les variables (nom de l'onglet à ouvrir) ; du coup j'ai modifié manuellement les roll-over de Dream (plus de a href ; ajout d'une fonction postermodule(); et un style pour le curseur.
Voici le code après modif :
<SCRIPT LANGUAGE=javascript>
function posterassoc(){
document.body.innerHTML+="<form id='formposterassoc' action='index.php' method='post'><input name='module' type='hidden' value='assoc'/></form>";
document.getElementById("formposterassoc").submit();
}
function posteractus(){
document.body.innerHTML+="<form id='formposteractus' action='index.php' method='post'><input name='module' type='hidden' value='actus'/></form>";
document.getElementById("formposteractus").submit();
}
function posterexpos(){
document.body.innerHTML+="<form id='formposterexpos' action='index.php' method='post'><input name='module' type='hidden' value='expos'/></form>";
document.getElementById("formposterexpos").submit();
}
function posterpubli(){
document.body.innerHTML+="<form id='formposterpubli' action='index.php' method='post'><input name='module' type='hidden' value='publi'/></form>";
document.getElementById("formposterpubli").submit();
}
function posterarchi(){
document.body.innerHTML+="<form id='formposterarchi' action='index.php' method='post'><input name='module' type='hidden' value='archi'/></form>";
document.getElementById("formposterarchi").submit();
}
function posterconta(){
document.body.innerHTML+="<form id='formposterconta' action='index.php' method='post'><input name='module' type='hidden' value='conta'/></form>";
document.getElementById("formposterconta").submit();
}
</SCRIPT>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<? if (!isset($_POST['module'])){
$module="actus";
}
else {
$module=$_POST['module'];
}
?>
<? if ($module=="assoc"){
?>
<td><img src="../images/asso2.gif" alt="" name="association" width="129" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','association','',1); posterassoc();" onMouseOver="MM_nbGroup('over','association','../images/asso2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/asso.gif" alt="" name="association" width="129" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="actus"){
?>
<td><img src="../images/actus2.gif" alt="" name="actualites" width="115" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','actualites','',1); posteractus();" onMouseOver="MM_nbGroup('over','actualites','../images/actus2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/actus.gif" alt="" name="actualites" width="115" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="expos"){
?>
<td><img src="../images/expos2.gif" alt="" name="exposition" width="129" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','exposition','',1); posterexpos();" onMouseOver="MM_nbGroup('over','exposition','../images/expos2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/expos.gif" alt="" name="exposition" width="129" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="publi"){
?>
<td><img src="../images/publi2.gif" alt="" name="publication" width="136" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','publication','',1); posterpubli();" onMouseOver="MM_nbGroup('over','publication','../images/publi2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/publi.gif" alt="" name="publication" width="136" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="archi"){
?>
<td><img src="../images/archi2.gif" alt="" name="archive" width="99" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','archive','',1); posterarchi();" onMouseOver="MM_nbGroup('over','archive','../images/archi2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/archi.gif" alt="" name="archive" width="99" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="conta"){
?>
<td><img src="../images/contact2.gif" alt="" name="contact" width="114" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','contact','',1); posterconta();" onMouseOver="MM_nbGroup('over','contact','../images/contact2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/contact.gif" alt="" name="contact" width="114" height="59" border="0" onload=""> </td>
<?
}
?>
</tr>
</table>
J'ai fait des fonctions JS qui me permettent de poster les variables (nom de l'onglet à ouvrir) ; du coup j'ai modifié manuellement les roll-over de Dream (plus de a href ; ajout d'une fonction postermodule(); et un style pour le curseur.
Voici le code après modif :
<SCRIPT LANGUAGE=javascript>
function posterassoc(){
document.body.innerHTML+="<form id='formposterassoc' action='index.php' method='post'><input name='module' type='hidden' value='assoc'/></form>";
document.getElementById("formposterassoc").submit();
}
function posteractus(){
document.body.innerHTML+="<form id='formposteractus' action='index.php' method='post'><input name='module' type='hidden' value='actus'/></form>";
document.getElementById("formposteractus").submit();
}
function posterexpos(){
document.body.innerHTML+="<form id='formposterexpos' action='index.php' method='post'><input name='module' type='hidden' value='expos'/></form>";
document.getElementById("formposterexpos").submit();
}
function posterpubli(){
document.body.innerHTML+="<form id='formposterpubli' action='index.php' method='post'><input name='module' type='hidden' value='publi'/></form>";
document.getElementById("formposterpubli").submit();
}
function posterarchi(){
document.body.innerHTML+="<form id='formposterarchi' action='index.php' method='post'><input name='module' type='hidden' value='archi'/></form>";
document.getElementById("formposterarchi").submit();
}
function posterconta(){
document.body.innerHTML+="<form id='formposterconta' action='index.php' method='post'><input name='module' type='hidden' value='conta'/></form>";
document.getElementById("formposterconta").submit();
}
</SCRIPT>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<? if (!isset($_POST['module'])){
$module="actus";
}
else {
$module=$_POST['module'];
}
?>
<? if ($module=="assoc"){
?>
<td><img src="../images/asso2.gif" alt="" name="association" width="129" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','association','',1); posterassoc();" onMouseOver="MM_nbGroup('over','association','../images/asso2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/asso.gif" alt="" name="association" width="129" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="actus"){
?>
<td><img src="../images/actus2.gif" alt="" name="actualites" width="115" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','actualites','',1); posteractus();" onMouseOver="MM_nbGroup('over','actualites','../images/actus2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/actus.gif" alt="" name="actualites" width="115" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="expos"){
?>
<td><img src="../images/expos2.gif" alt="" name="exposition" width="129" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','exposition','',1); posterexpos();" onMouseOver="MM_nbGroup('over','exposition','../images/expos2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/expos.gif" alt="" name="exposition" width="129" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="publi"){
?>
<td><img src="../images/publi2.gif" alt="" name="publication" width="136" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','publication','',1); posterpubli();" onMouseOver="MM_nbGroup('over','publication','../images/publi2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/publi.gif" alt="" name="publication" width="136" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="archi"){
?>
<td><img src="../images/archi2.gif" alt="" name="archive" width="99" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','archive','',1); posterarchi();" onMouseOver="MM_nbGroup('over','archive','../images/archi2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/archi.gif" alt="" name="archive" width="99" height="59" border="0" onload=""> </td>
<?
}
?>
<? if ($module=="conta"){
?>
<td><img src="../images/contact2.gif" alt="" name="contact" width="114" height="59" border="0" onload=""> </td>
<?
}
else{
?>
<td><img onClick="MM_nbGroup('down','group1','contact','',1); posterconta();" onMouseOver="MM_nbGroup('over','contact','../images/contact2.gif','',1); this.style.cursor='hand'" onMouseOut="MM_nbGroup('out')" src="../images/contact.gif" alt="" name="contact" width="114" height="59" border="0" onload=""> </td>
<?
}
?>
</tr>
</table>