Bonjour, j'ai cr�e ce sujet car j'ai besoin d'aide pour mon script.
J'ai cr�e un truc pour Minimiser et Fermer un truc (Cacher/Afficher) Quand il y'en a un ca marche bien Et quand il y'en a deux la sa pose probl�me car le div 2 ferme le div 1 mais le div 2 ne se ferme jamais.Ca peux �tre superflu donc voici le code.
Code Javascript :
Et le 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 function divaffiche(){ document.getElementById("box_keywords").style.display = "block"; document.getElementById("cache").style.display = "inline"; document.getElementById("voir").style.display = "none"; } function divcache(){ document.getElementById("box_keywords").style.display = "none"; document.getElementById("cache").style.display = "none"; document.getElementById("voir").style.display = "inline"; } function divclose(){ document.getElementById("box_keywords").style.display = "none"; document.getElementById("box").style.display = "none"; document.getElementById("close").style.display = "none"; document.getElementById("cache").style.display = "none"; document.getElementById("voir").style.display = "none"; }
Code HTML :
Merci de votre aide
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 <div id="box"> <!-- Boite 1 (Div1) --> <b class="box_title"><?php if (isset($box_name)) { echo $box_name; }else { echo "Sans titre";} ?></b> <!--Close--> <a id="close" onClick="divclose()" style="display:inline;"/> <img align="right" src="images/button/close.gif" alt="Fermer" title="Fermer" id="close"> </a> <!--Restore--> <a id="voir" onClick="divaffiche()" style="display:none;"/> <img align="right" src="images/button/restor.gif" alt="Restaurer" title="Restaurer"> </a> <!--Minimize--> <a id="cache" onClick="divcache()" style="display:inline;"/> <img align="right" src="images/button/minimize.gif" alt="Minimiser" title="Minimiser"> </a> <div id="box_keywords"> <p>5sdsd</p> </div> </div> <div id="box"> <!-- Boite 2 (Div2) --> <b class="box_title"><?php if (isset($box_name)) { echo $box_name; }else { echo "Sans titre";} ?></b> <!--Close--> <a id="close" onClick="divclose()" style="display:inline;"/> <img align="right" src="images/button/close.gif" alt="Fermer" title="Fermer" id="close"> </a> <!--Restore--> <a id="voir" onClick="divaffiche()" style="display:none;"/> <img align="right" src="images/button/restor.gif" alt="Restaurer" title="Restaurer"> </a> <!--Minimize--> <a id="cache" onClick="divcache()" style="display:inline;"/> <img align="right" src="images/button/minimize.gif" alt="Minimiser" title="Minimiser"> </a> <div id="box_keywords"> <p>5sdsd</p> </div> </div>
J'ai vu ce script qui ma mit sur le chemin et qui marche tr�s bien. Mais je voudrai garder mon script.
ici
Merci
Partager