Bonjour,
J'ai trouvé un code sur le net que j'ai adapter à mon site :
http://technopujades.free.fr/cortes/rub-faq.php
Tout fonctionne, lorsque l'on passe sur "descendre" ou sur "monter" le texte défile ...
Donc nikel !
Maintenant quand j'inclu ma rubrique faq dans le site ...
Il y a plus rien qui fonctionne ... ???
J'ai beau mettre le code script dans les balise head ou pas rien ne fonctionne !!!
Incomprehensible ?!
Si quelqu'un a une idée ?
Merci d'avance
Voici le code que j'ai utilisé,
visible a l'adresse suivante : http://technopujades.free.fr/cortes/index.php?rub=faq
Et à l'adresse suivante : http://technopujades.free.fr/cortes/index.php?rub=faq
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128 <script type="text/JavaScript"> var sRepeat=null; function doScrollerIE(dir, src, amount) { if (amount==null) { amount=10 } 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> <table width="908" height="495" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="580" height="495" align="left" valign="top"> <table width=580 height="450" border="0" cellpadding=0 cellspacing="0"> <tr> <td align="left" valign="top"> <a onMouseOver="return doScrollerIE('up','faq1',20)" onMouseOut="clearInterval(sRepeat)" href="JavaScript:" class="lien">Monter</a> </td> </tr> <tr> <td> <div id=faq1 style="width: 580; height: 350; overflow: hidden;"> <div align="justify"> <?php //connection a la base include "inc/connect.php"; //Recupération de la rubrique $question = $_GET['question']; //selection if ($question == "ce") { $rq = "select distinct id from tbl_faq where ce ='1' Order by id DESC"; } elseif ($question == "employeur") { $rq = "select distinct id from tbl_faq where employeur = '1' Order by id DESC"; } elseif ($question == "employe") { $rq = "select distinct id from tbl_faq where employe = '1' Order by id DESC"; } else { $rq = 'select distinct id from tbl_faq Order by id DESC'; } //recuperation des questions/reponses $result = mysql_query($rq) or die ("Affichage des faq impossible"); while ($ligne = mysql_fetch_array($result)) { extract($ligne); if ($id != "") { $sql = "select titre, texte from tbl_faq where id='$id'"; $req = mysql_query($sql) or die ("Affichage impossible"); $data = mysql_fetch_array($req); $titre = $data['titre']; $texte = $data['texte']; echo '<p class="stitre">'.$titre.'</p>'; echo '<p class="texte">'.$texte.'</p>'; } } //fermeture de la connection SQL mysql_close(); ?> </div> </div> </td> </tr> <tr> <td align="left" valign="bottom"> <a onMouseOver="return doScrollerIE('down','faq1',20)" onMouseOut="clearInterval(sRepeat)" href="JavaScript:" class="lien">Descendre</a> </td> </tr> </table> </td> <td width="328" height="495" align="right" valign="top"> <p class="texte"><a href="<?php echo 'index.php?rub=faq&question=employe'; ?>" class="texte">Employé</a></p> <p class="texte"><a href="<?php echo 'index.php?rub=faq&question=employeur'; ?>" class="texte">Employeur</a></p> <p class="texte"><a href="<?php echo 'index.php?rub=faq&question=ce'; ?>" class="texte">Ce</a></p> </td> </tr> </table>
Partager