Blogger : problème de code, pour créer une foire aux questions [Résolu/Fermé]

Signaler
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015
-
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015
-
Salut à tous les experts de Blogger,

J'suis une débutante sur Blogger. Et avant de venir vous voir, je n'ai pas trouvé mon bonheur sur Google.
En fait j'ai un petit problème sur la page http://coloration-des-cheveux.blogspot.com/p/foire-aux-questions.html C'est celle de la foire aux questions. La "Question trois" refuse de s'ouvrir quand je clique dessus. Et je ne sais pas pourquoi.

Est-ce que quelqu'un veut bien m'expliquer ce que j'ai fait de travers pour que je corrige l'erreur? Merci d'avance ;-)

Voici le code que j'ai inséré dans l'éditeur html de la page concerné :

<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(d)">Question un</a></span></span></span></div>
<div id="d" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question un.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(e)">Question deux</a></span></span></span></div>
<div id="e" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question deux.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(f)">Question trois</a></span></span></span></div>
<div id="e" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question trois.</span></div>
</div>
<script language="JavaScript" type="text/javascript">// <![CDATA[
function toggle(tag) {
if (tag.style.display=='') {
tag.style.display='none'
} else {
tag.style.display=''
}
}
// ]]></script>

4 réponses

Messages postés
103
Date d'inscription
jeudi 4 août 2011
Statut
Membre
Dernière intervention
22 novembre 2016
7
Bonsoir,

Il y a peut-être eu un pb de copier/coller.

Voici le code (voir la correction en gras) qui devrait marcher (Q3) :

<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(f)">Question trois</a></span></span></span></div>
<div id="f" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question trois.</span></div>
</div>

@+
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015

Pardon, j'ai oublié de mettre le code avec toutes les questions qui me posent problème. Le voici :

<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(d)">Question un</a></span></span></span></div>
<div id="d" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question un.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(e)">Question deux</a></span></span></span></div>
<div id="e" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question deux.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(f)">Question trois</a></span></span></span></div>
<div id="f" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question trois.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(g)">Question quatre</a></span></span></span></div>
<div id="g" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question quatre.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(h)">Question cinq</a></span></span></span></div>
<div id="h" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question cinq.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(i)">Question six</a></span></span></span></div>
<div id="i" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question six.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(j)">Question sept</a></span></span></span></div>
<div id="j" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question sept.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(k)">Question huit</a></span></span></span></div>
<div id="k" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question huit.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(l)">Question neuf</a></span></span></span></div>
<div id="l" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question neuf.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(m)">Question dix</a></span></span></span></div>
<div id="m" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question dix.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(n)">Question onze</a></span></span></span></div>
<div id="n" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question onze.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(o)">Question douze</a></span></span></span></div>
<div id="o" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question douze.</span></div>
</div>
<script language="JavaScript" type="text/javascript">// <![CDATA[
function toggle(tag) {
if (tag.style.display=='') {
tag.style.display='none'
} else {
tag.style.display=''
}
}
// ]]></script>
Messages postés
103
Date d'inscription
jeudi 4 août 2011
Statut
Membre
Dernière intervention
22 novembre 2016
7
Pidou, je ne suis pas du tout un connaisseur de Blogger.
Le souci est que ton code spécifique est "invisible" par des moyens classiques.

Mais ce que je peux te dire, c'est qu'il marche :
http://img17.imageshack.us/img17/3678/18kh.png

Espérons qu'une âme charitable passera par là ;)

@+
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015

Je pensais que tu étais un expert Blogger, puisque dans mon tout premier message je dis "Salut à tous les experts de Blogger" :-(.
Messages postés
103
Date d'inscription
jeudi 4 août 2011
Statut
Membre
Dernière intervention
22 novembre 2016
7
Ton souci est à la racine (pas fait exprès) un problème de code, indépendant de l'architecture, Blogger ou autre, c'est pourquoi je t'ai donné des idées.

Bonne soirée à toi

@+
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015

Je comprends un peu mieux. Pour toi, le problème de fonctionnement du code, vient tout simplement du code en lui-même et pas de Blogger.

Je vais refaire un tour sur le web et voir ce que je trouve. Et j'espère que quelqu'un finira par me dire pourquoi ce code ne marche pas bien sur ma page Blogger.

En tout cas, je te remercie d'avoir tenté de m'aider.

Au revoir :-).
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015

Problème enfin résolu.

Quelqu'un m'a suggéré de tester toutes les lettres de l'alphabet en les insérant dans les éléments suivants :
- %20toggle(lettre à insérer ici)
- <div id="lettre à insérer ici"

Conclusion :
1. J'ai crée 5 autres questions. Et je me suis rendue compte que les questions ne s'ouvraient pas, après insertion des lettres suivantes :
- a
- b
- c
- f
- g
- h
- k
- l
- m

2. Quelqu'un m'a aussi dit que ce code ne réagit pas de la même manière selon la plateforme de blog ou le site utilisé. Il a fait un test sur Prestashop et sur Overblog. Et des questions qui s'ouvrent sans difficultés sur Blogger, ont du mal à s'ouvrir sur Overblog ou sur Prestashop.

3. Voici le code que j'ai finalement inséré dans l'éditeur html de ma page Blogger http://coloration-des-cheveux.blogspot.fr/p/foire-aux-questions.html:

<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(n)">Question un</a></span></span></span></div>
<div id="n" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question un.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(o)">Question deux</a></span></span></span></div>
<div id="o" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question deux.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(q)">Question trois</a></span></span></span></div>
<div id="q" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question trois.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(d)">Question quatre</a></span></span></span></div>
<div id="d" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question quatre.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(e)">Question cinq</a></span></span></span></div>
<div id="e" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question cinq.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(s)">Question six</a></span></span></span></div>
<div id="s" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question six.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(w)">Question sept</a></span></span></span></div>
<div id="w" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question sept.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(y)">Question huit</a></span></span></span></div>
<div id="y" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question huit.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(i)">Question neuf</a></span></span></span></div>
<div id="i" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question neuf.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(j)">Question dix</a></span></span></span></div>
<div id="j" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question dix.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(p)">Question onze</a></span></span></span></div>
<div id="p" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question onze.</span></div>
</div>
<div align="justify">
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(r)">Question douze</a></span></span></span></div>
<div id="r" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question douze.</span></div>
</div>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span></div>
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(t)">Question treize</a></span></span></span></div>
<div id="t" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question treize.</span></div>
</div>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span>
<br />
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(u)">Question quatorze</a></span></span></span></div>
<div id="u" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question quatorze.</span></div>
</div>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span>
<br />
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(v)">Question quinze</a></span></span></span></div>
<div id="v" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question quinze.</span></div>
</div>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span>
<br />
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(x)">Question seize</a></span></span></span></div>
<div id="x" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question seize.</span></div>
</div>
<span style="font-size: small;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: black;"><b><br /></b></span></span></span>
<br />
<div align="justify">
<span style="font-family: inherit;"><span style="font-size: small;"><span style="color: black;"><a href="javascript:%20toggle(z)">Question dix-sept</a></span></span></span></div>
<div id="z" style="display: none;">
<div align="justify">
<span style="color: black;">Reply to question dix-sept.</span></div>
</div>
<script language="JavaScript" type="text/javascript">// <![CDATA[
function toggle(tag) {
if (tag.style.display=='') {
tag.style.display='none'
} else {
tag.style.display=''
}
}
// ]]></script>


Encore merci à tous ceux qui m'ont aidé ;-)
Je vois que vous avez résolu votre problème.La prochaine fois si vous avez des questions,vous pouvez visiterwww.blogger-me.com .A bientôt
Messages postés
16
Date d'inscription
vendredi 26 juillet 2013
Statut
Membre
Dernière intervention
14 décembre 2015

Merci pour l'info. Je ne connaissais pas ce site. Je le visite de suite parce que j'ai d'autres questions à propos de Blogger et, surtout sur le modèle dynamique.

Ciao ;-)