Bonjour à tous, ceci est mon premier post sur le forum. Je vous explique mon casse-tête :
Je souhaite intégrer un menu défilant en javascript sur mon site, le soucis c'est que celui-ci date un peu et n'est pas tolérer par le doctype. Le script marche et défile sous IE mais pas sous firefox. J'ai cherché une solution un peu partout, il semblerait que le problème vienne de la syntaxe de mon javascript...pas compliqué alors me direz-vous...et bah nan,... çà fais 12h que je suis dessus, j'ai plus de solution et j'ai mal à l'encéphale...
...je recherche donc une âme charitable, je vous laisse le code est un lien test.
Merci à vous
Le doctype :
Le css de la div ( bien qu'aucun rapport):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Le javascript :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 #menudefilant { width: 185px; margin-left:0px; height: 180px; overflow: hidden; }
html :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 <script> var sRepeat=null; function doScrollerIE(dir, src, amount) { if (amount==null) { amount=10 } //http://www.presencenet.net/ if (dir=="up") { document.all[src].scrollTop-=amount } else { document.all[src].scrollTop+=amount } if (sRepeat==null) { sRepeat = setInterval("doScrollerIE('" + dir + "','" + src + "'," + amount + ")",100)} return false } window.document.onmouseout = new Function("clearInterval(sRepeat);sRepeat=null"); window.document.ondragstart = new Function("return false"); function toggle( targetId ){ {target = document.all( targetId ); if (target.style.display == "none") { target.style.display = ""; } else { target.style.display = "none"; } } } </script>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <body> <table width="180px" height="130px" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td onmouseover="document.img_32.src='../images/fleche_haut_blanc.png';" onmouseout="document.img_32.src='../images/fleche_haut_vert.png';"><right> <a onmouseover="return doScrollerIE('up','menudefilant',10)" onmouseout="clearInterval(sRepeat)" href="#" class="font_blanc"><img src="../images/fleche_haut_vert.png" alt=" " name="img_32" width="50" height="19" border="0" id="img_32" /></a></right> </td> </tr> <tr> <td><div align="left" id="menudefilant"><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Agenda</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Association</a><br /> <span class="Title1_blanc">*</span><a href="http://www.maghreb-facile.com" class="liens_interne_menu"> Commerce</a><br /> <span class="Title1_blanc">*</span><a href="http://www.maghreb-facile.com" class="liens_interne_menu"> Finance</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Immobilier</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Location</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Loisirs</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Musique</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Restauration</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Service</a><br /> <span class="Title1_blanc">* </span><a href="http://www.maghreb-facile.com" class="liens_interne_menu">Tourisme</a><br /> <span class="Title1_blanc">*</span><a href="http://www.maghreb-facile.com" class="liens_interne_menu"> Voyage</a><br /> <br /> </div></td> </tr> <tr> <td onmouseover="document.img_33.src='../images/fleche_bas_blanc.png';" onmouseout="document.img_33.src='../images/fleche_bas_vert.png';"><right> <a onmouseover="return doScrollerIE('down','menudefilant',10)" onmouseout="clearInterval(sRepeat)" href="#" class="font_blanc"><img src="../images/fleche_bas_vert.png" alt=" " name="img_33" width="50" height="19" border="0" id="img_33" /></a> </right></td> </tr> </table> </body> </html>
Partager