Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > JavaScript
JavaScript Forum programmation JavaScript. Lire : Cours JavaScript, FAQ JavaScript, Toutes les FAQ JavaScript et Sources JavaScript
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 04/01/2012, 16h31   #1
Invité de passage
 
Homme
Étudiant
Inscription : juin 2011
Messages : 8
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Côte d'Or (Bourgogne)

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2011
Messages : 8
Points : 0
Points : 0
Par défaut Appel d'un script à partir d'un module de forum

Bonjour,

J'ai quelque petits problèmes pour faire appel à un code javascript depuis un "module" dans un forum ForumActif.

Je ne comprend pas d'ou vient le problème... Est ce l'appel qui ne fonctionne pas? Ou est-ce le javascript? Ou bien le code fonctionne mais rien ne s'affiche?
Le problème ne doit pas venir du script en lui même, il y a quelque chose que je rate ailleurs...
J'ai un doute sur les "document.getElementById" étant donné que mon code se trouve dans un module et non sur une page HTML.


Voici le code à l'intérieure de mon module :

Code html :
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
<head>
<script type="text/javascript" src="http://originslinkshell.forumgratuit.fr/12078.js">
 
</script>
 
</head>
<body onload="RunEorzeaClock(1325692136);">
 
	<style type="text/css">
	.MoonTime {
		color: #BABEBE;
		text-align: center;
	}
	.Moon {
		color: #BABEBE;
		text-align: center;
		vertical-align: bottom;
		padding: 0 3px;
	}
	.current_moon {
		font-weight: bold;
	}
	.moon_width {
		width: 69px;
	}
	#EorzeaTime {
		color: #BABEBE;
		text-align: center;
	}
	#leverefreshdiv {
		color: #BABEBE;
		text-align: center;
	}
	</style>
 
	<table style="width: 987px;margin: 0 auto;">
 
		<tr>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/newm10.png" width="32px" /><div id="lunar_m1" class="MoonTime"></div></div>
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/waxc10.png" width="32px" /><div id="lunar_m2" class="MoonTime"></div></div>
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/firstq10.png" width="32px" /><div id="lunar_m3" class="MoonTime"></div></div>
 
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/waxg10.png" width="32px" /><div id="lunar_m4" class="MoonTime"></div></div>
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/fullm10.png" width="32px" /><div id="lunar_m5" class="MoonTime"></div></div>
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/wang10.png" width="32px" /><div id="lunar_m6" class="MoonTime"></div></div>
 
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/lastq10.png" width="32px" /><div id="lunar_m7" class="MoonTime"></div></div>
			</td>
			<td class="moon_width">
				<div class="Moon"><img src="http://i45.servimg.com/u/f45/16/35/50/30/wanc10.png" width="32px" /><div id="lunar_m8" class="MoonTime"></div></div>
			</td>
			<td class="Moon">
				<div class="Moon"><span class="current_moon">Eorzea Time:</span><div id="EorzeaTime"></div></div>
 
			</td>
			<td class="Moon">
				<div class="Moon"><span class="current_moon">Reset mandats:</span><div id="leverefreshdiv"></div></div>
			</td>
		</tr>
</table>
</body>

Et voici le script Javascript appelé :

Code :
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
var timestamp;
var localTimestamp;
var ratio;
var formula;
var mooncount;
var offset2;
var moonstart;
var newmoon;
var waxcrescent;
var firstquarter;
var waxgibbous;
var fullmoon;
var wangibbous;
var lastquarter;
var wancrescent;
 
function RunEorzeaClock(serverTimestamp) {
 
    //Adjusting the time
    serverTimestamp = (serverTimestamp + 5) * 1000;
    //Setting timestamp to that of the server
    timestamp = serverTimestamp;
    //Settting local time stamp to current dates time
    localTimestamp = new Date().getTime();
    updateEorzeaTime();
 
    //Information for moonphases
    ratio = 1440 / 70;
    formula = 1000 * 60 * 60 * 24 * 4 / ratio;
    mooncount = new Date();
    offset2 = 21 - mooncount.getTimezoneOffset() / 60;
    moonstart = new Date(2010, 7, 15, offset2, 20, 0);
 
    newmoon = new Date(moonstart.getTime());
    waxcrescent = new Date(moonstart.getTime() + formula);
    firstquarter = new Date(moonstart.getTime() + formula * 2);
    waxgibbous = new Date(moonstart.getTime() + formula * 3);
    fullmoon = new Date(moonstart.getTime() + formula * 4);
    wangibbous = new Date(moonstart.getTime() + formula * 5);
    lastquarter = new Date(moonstart.getTime() + formula * 6);
    wancrescent = new Date(moonstart.getTime() + formula * 7);
 
    UpdateMoons();
 
    LeveRefresh();
 
}
 
function updateEorzeaTime() {
 
    var now = new Date();
 
    //Converting current time to Eorzean
    //getTime function returns UNIX UTC timestamp
    var tmpTime = ((timestamp + now.getTime() - localTimestamp) / 1000) * 4188615725;
 
    var EorzeanYear = parseInt(tmpTime / 562949953421312);
    EorzeanYear -= 9519;
    EorzeanYear /= 12;
    EorzeanYear = parseInt(EorzeanYear);
 
    var EorzeanMonth = parseInt(tmpTime / 562949953421312);
    EorzeanMonth = EorzeanMonth % 12;
    EorzeanMonth++;
    EorzeanMonth = parseInt(EorzeanMonth);
 
    var EorzeanDay = parseInt(tmpTime / 17592186044416);
    EorzeanDay &= 31;
    EorzeanDay++;
    EorzeanDay = parseInt(EorzeanDay);
 
    var tmpTime = ((timestamp + now.getTime() - localTimestamp) / 1000) * 24
    var EorzeanHour = parseInt(tmpTime / 4200);
    EorzeanHour %= 24;
 
    tmpTime = ((timestamp + now.getTime() - localTimestamp) / 1000) * 1440;
    var EorzeanMinute = parseInt(tmpTime / 4200);
    EorzeanMinute -= 10;
    EorzeanMinute %= 60;
 
    //adding '0' before hours and minutes if less than 10
    if (EorzeanHour < 10) EorzeanHour = "0" + EorzeanHour;
    if (EorzeanMinute < 10) EorzeanMinute = "0" + EorzeanMinute;
 
    document.getElementById("EorzeaTime").innerHTML = EorzeanHour + ':' + EorzeanMinute + ', ' + EorzeanMonth + '/' + EorzeanDay + '/' + EorzeanYear;
 
    t = setTimeout('updateEorzeaTime()', 1000);
}
 
function UpdateMoons() {
 
    //gets the value per moon
    var moon1 = LunarCalendarRefresh(newmoon, 'moon1');
    var moon2 = LunarCalendarRefresh(waxcrescent, 'moon2');
    var moon3 = LunarCalendarRefresh(firstquarter, 'moon3');
    var moon4 = LunarCalendarRefresh(waxgibbous, 'moon4');
    var moon5 = LunarCalendarRefresh(fullmoon, 'moon5');
    var moon6 = LunarCalendarRefresh(wangibbous, 'moon6');
    var moon7 = LunarCalendarRefresh(lastquarter, 'moon7');
    var moon8 = LunarCalendarRefresh(wancrescent, 'moon8');
 
    //transfer the content to the dom respectively
    if (document.getElementById("lunar_m1"))
        document.getElementById("lunar_m1").innerHTML = moon1;
    if (document.getElementById("lunar_m2"))
        document.getElementById("lunar_m2").innerHTML = moon2;
    if (document.getElementById("lunar_m3"))
        document.getElementById("lunar_m3").innerHTML = moon3;
    if (document.getElementById("lunar_m4"))
        document.getElementById("lunar_m4").innerHTML = moon4;
    if (document.getElementById("lunar_m5"))
        document.getElementById("lunar_m5").innerHTML = moon5;
    if (document.getElementById("lunar_m6"))
        document.getElementById("lunar_m6").innerHTML = moon6;
    if (document.getElementById("lunar_m7"))
        document.getElementById("lunar_m7").innerHTML = moon7;
    if (document.getElementById("lunar_m8"))
        document.getElementById("lunar_m8").innerHTML = moon8;
 
    //if moons' value is default then we need much faster refresh to get the proper time the soonest
    if (moon1 == '00 : 00 : 00' && moon2 == '00 : 00 : 00' && moon3 == '00 : 00 : 00' && moon4 == '00 : 00 : 00' && moon5 == '00 : 00 : 00' && moon6 == '00 : 00 : 00' && moon7 == '00 : 00 : 00' && moon8 == '00 : 00 : 00')
        m = setTimeout('UpdateMoons()', 1);
    else
        m = setTimeout('UpdateMoons()', 500);
}
 
function LunarCalendarRefresh(adjust, moon) {
    //00 : 00 : 00 set as the default value
    var value = '00 : 00 : 00';
    var now = new Date();
    // difference will be the countdown time for each moon
    difference = adjust.getTime() - (timestamp + now.getTime() - localTimestamp);
    if (difference > 0) {
        //translate to hours
        hours = Math.floor(difference / (60 * 60 * 1000));
        difference -= hours * 60 * 60 * 1000;
        //translate to min
        minutes = Math.floor(difference / (60 * 1000));
        difference -= minutes * 60 * 1000;
        //translate to sec
        seconds = Math.floor(difference / 1000);
 
        //if single digit then add padding-left '0'
        if (hours < 10) hours = "0" + hours;
        if (minutes < 10) minutes = "0" + minutes;
        if (seconds < 10) seconds = "0" + seconds;
 
        value = hours + " : " + minutes + " : " + seconds;
    }
    else {
        if ((adjust.getTime() + formula) < (timestamp + now.getTime() - localTimestamp)) {
            temp = adjust.getTime();
            adjust.setTime(temp + formula * 8);
        }
        else {
            //if difference <= 0 then the moon will be the current moon
            value = '<span class="current_moon">&nbsp&nbsp;&nbsp;&nbsp;Current&nbsp;&nbsp;&nbsp;</span>';
            //change the big moon current
            if (document.getElementById("lb_lunar_calendar_icon"))
                document.getElementById("lb_lunar_calendar_icon").className = 'icon ' + moon;
            //change the langbar moon current
            if (document.getElementById("moon_image"))
                document.getElementById("moon_image").className = 'moon ' + moon;
        }
    }
    return value;
}
 
function LeveRefresh() {
    var now = new Date();
    //compute time passed between a UNIX timestamp when we had a guild refresh and the current UNIX timestamp
    var difference = (timestamp + now.getTime() - localTimestamp) - Date.UTC(2010, 11, 10, 12);
    if (isNaN(difference))
        return;
 
    //resets happens every 36 hrs, so find out how many resets we had in the passed time
    var resetsSoFar = Math.floor(difference / (12 * 60 * 60 * 1000));
    //compute the next reset
    var nextReset = (resetsSoFar + 1) * 12 * 60 * 60 * 1000;
    //next reset will occur in
    difference = nextReset - difference;
 
    //translate to hours
    var hours = Math.floor(difference / (60 * 60 * 1000));
    difference -= hours * 60 * 60 * 1000;
    //translate to min
    var minutes = Math.floor(difference / (60 * 1000));
    difference -= minutes * 60 * 1000;
    //translate to sec
    var seconds = Math.floor(difference / 1000);
 
    //if single digit then add padding-left '0'
    if (hours < 10) hours = "0" + hours;
    if (minutes < 10) minutes = "0" + minutes;
    if (seconds < 10) seconds = "0" + seconds;
 
    //refresh the lunar clock with current value
    if (document.getElementById("leverefreshdiv"))
        document.getElementById("leverefreshdiv").innerHTML = hours + "h " + minutes + "m " + seconds + "s";
 
    setTimeout('LeveRefresh()', 200);
}
Jeremy Lepretre est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2012, 17h16   #2
Expert Confirmé Sénior
 
Avatar de RomainVALERI
 
Homme Romain VALERI
POOête
Inscription : avril 2008
Messages : 2 582
Détails du profil
Informations personnelles :
Nom : Homme Romain VALERI
Âge : 35
Localisation : France, Meurthe et Moselle (Lorraine)

Informations professionnelles :
Activité : POOête

Informations forums :
Inscription : avril 2008
Messages : 2 582
Points : 4 088
Points : 4 088
Par défaut hors-sujet : refactorisation

Loin de moi l'idée d'entreprendre avec toi une refactorisation complète ^^

Mais ce genre de structures...
Code javascript :
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
var moonTypes = [];
newmoon = new Date(moonstart.getTime());
waxcrescent = new Date(moonstart.getTime() + formula);
firstquarter = new Date(moonstart.getTime() + formula * 2);
waxgibbous = new Date(moonstart.getTime() + formula * 3);
fullmoon = new Date(moonstart.getTime() + formula * 4);
wangibbous = new Date(moonstart.getTime() + formula * 5);
lastquarter = new Date(moonstart.getTime() + formula * 6);
wancrescent = new Date(moonstart.getTime() + formula * 7);
 
//gets the value per moon
var moon1 = LunarCalendarRefresh(newmoon, 'moon1');
var moon2 = LunarCalendarRefresh(waxcrescent, 'moon2');
var moon3 = LunarCalendarRefresh(firstquarter, 'moon3');
var moon4 = LunarCalendarRefresh(waxgibbous, 'moon4');
var moon5 = LunarCalendarRefresh(fullmoon, 'moon5');
var moon6 = LunarCalendarRefresh(wangibbous, 'moon6');
var moon7 = LunarCalendarRefresh(lastquarter, 'moon7');
var moon8 = LunarCalendarRefresh(wancrescent, 'moon8');
 
//transfer the content to the dom respectively
if (document.getElementById("lunar_m1"))
document.getElementById("lunar_m1").innerHTML = moon1;
if (document.getElementById("lunar_m2"))
document.getElementById("lunar_m2").innerHTML = moon2;
if (document.getElementById("lunar_m3"))
document.getElementById("lunar_m3").innerHTML = moon3;
if (document.getElementById("lunar_m4"))
document.getElementById("lunar_m4").innerHTML = moon4;
if (document.getElementById("lunar_m5"))
document.getElementById("lunar_m5").innerHTML = moon5;
if (document.getElementById("lunar_m6"))
document.getElementById("lunar_m6").innerHTML = moon6;
if (document.getElementById("lunar_m7"))
document.getElementById("lunar_m7").innerHTML = moon7;
if (document.getElementById("lunar_m8"))
document.getElementById("lunar_m8").innerHTML = moon8;
...peut, après examen des parties communes et quelques refactorisations, ressembler grosso modo à...
Code :
1
2
3
4
5
var MOON_TYPE_NAMES = ["newmoon", "waxcrescent", "firstquarter", "waxgibbous", "fullmoon", "wangibbous", "lastquarter", "wancrescent"];
for (var m, i = 1; i <= MOON_TYPE_NAMES.length; ++i) {
   m = new Date(moonstart.getTime()) + formula * (i - 1);
   document.getElementById("lunar_m" + i).innerHTML = LunarCalendarRefresh(m, 'moon' + i);
}
^^

(et à la place d'accéder aux variables moon1, moon2, etc., tu crées un tableau moons, alimenté en ajoutant une ligne dans la boucle que je te propose, et tu pourras accéder au contenu par indice.)
__________________

...pour les linguistes et les curieux >>> générateur de phrases aléatoires

__________________
RomainVALERI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2012, 18h50   #3
Invité de passage
 
Homme
Étudiant
Inscription : juin 2011
Messages : 8
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Côte d'Or (Bourgogne)

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2011
Messages : 8
Points : 0
Points : 0
Ah oui c'est vrai merci du conseil, vu que c'est pas moi l'auteur de ce code et que j'ai juste essayé de me l'approprier j'avais pas vraiment fait gaffe à ça.

Cela dit je ne pense pas que le problème vienne de la...
Jeremy Lepretre est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2012, 19h02   #4
Expert Confirmé Sénior
 
Avatar de RomainVALERI
 
Homme Romain VALERI
POOête
Inscription : avril 2008
Messages : 2 582
Détails du profil
Informations personnelles :
Nom : Homme Romain VALERI
Âge : 35
Localisation : France, Meurthe et Moselle (Lorraine)

Informations professionnelles :
Activité : POOête

Informations forums :
Inscription : avril 2008
Messages : 2 582
Points : 4 088
Points : 4 088
Citation:
Envoyé par Jeremy Lepretre Voir le message
Cela dit je ne pense pas que le problème vienne de la...
Non, carrément pas. (comme le suggérait le titre de mon post : "hors-sujet..." )

En passant : balises CODE autour des extraits s'il te plait épargne nos pauvres yeux
__________________

...pour les linguistes et les curieux >>> générateur de phrases aléatoires

__________________
RomainVALERI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2012, 19h30   #5
Responsable Développement Web

 
Avatar de Bovino
 
Homme Didier Mouronval
Développeur Web
Inscription : juin 2008
Messages : 13 808
Détails du profil
Informations personnelles :
Nom : Homme Didier Mouronval
Âge : 41
Localisation : France, Gironde (Aquitaine)

Informations professionnelles :
Activité : Développeur Web
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : juin 2008
Messages : 13 808
Points : 35 787
Points : 35 787
Si je comprends bien, le code de ton module est inséré dans ta page.
Ceci dit, ton module contient des balises <head> et <body> qui n'ont rien à y faire et qui sont probablement sources de dysfonctionnements...
__________________
Pas de question technique par MP !
Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
Vous possédez un blog et aimeriez diffuser vos billets sur le forum, contactez-moi !
Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
Mon livre sur jQuery
Bovino est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/01/2012, 13h03   #6
Invité de passage
 
Homme
Étudiant
Inscription : juin 2011
Messages : 8
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Côte d'Or (Bourgogne)

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2011
Messages : 8
Points : 0
Points : 0
Oui c'est exactement ca Bovino, j'ai retiré les balises head et body, merci.
Du coup je ne comprend pas comment faire appel à ma fonction depuis mon module.

Donc comment déclencher la fonction :

Code :
<body onload="RunEorzeaClock(1325692136);">
sans le body onload?

j'ai mis
Code :
<a href="javascript:RunEorzeaClock(1325692136);"></a>
Mais cela ne fonctionne toujours pas
Jeremy Lepretre est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/01/2012, 13h47   #7
Expert Confirmé Sénior
 
Avatar de RomainVALERI
 
Homme Romain VALERI
POOête
Inscription : avril 2008
Messages : 2 582
Détails du profil
Informations personnelles :
Nom : Homme Romain VALERI
Âge : 35
Localisation : France, Meurthe et Moselle (Lorraine)

Informations professionnelles :
Activité : POOête

Informations forums :
Inscription : avril 2008
Messages : 2 582
Points : 4 088
Points : 4 088
Citation:
Envoyé par Jeremy Lepretre Voir le message
Mais cela ne fonctionne toujours pas
Je ne comprends pas bien ce que tu espérais en faisant ça

La propriété onload du body provoque, au moment de l'interprétation de la page par le navigateur, la création d'un gestionnaire d'événement (une fonction JS spécifique) et son association à l'élément (donc ici : le body). Insérer du code JS dans le href d'un lien (ce qui est déjà sémantiquement discutable mais on en est pas là ^^) n'a rien de similaire : le code ne sera déclenché que lors de l'activation du lien par l'utilisateur, pas au moment où le code du lien est interprété. Mais tu peux mettre une propriété onload sur d'autres éléments que body, par contre... (edit : hmmm à vérifier je ne suis plus sur de ce point ... sur un élément frameset peut-être ?)
__________________

...pour les linguistes et les curieux >>> générateur de phrases aléatoires

__________________
RomainVALERI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/01/2012, 16h41   #8
Invité de passage
 
Homme
Étudiant
Inscription : juin 2011
Messages : 8
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Côte d'Or (Bourgogne)

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2011
Messages : 8
Points : 0
Points : 0
Alors tout le problème est la, le seule moyen d'appel que je connaisse est de mettre un

Code :
onLoad= RunEorzeaClock(1325692136);
sur le <body>.

Mais vu que ce code fait partie d'un module qui ne peut pas posséder de <body> je suis coincé.

Je fais des recherche sur internet pour savoir si on peut mettre le onLoad sur autre chose que le body
Jeremy Lepretre est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/01/2012, 19h43   #9
Expert Confirmé Sénior
 
Avatar de RomainVALERI
 
Homme Romain VALERI
POOête
Inscription : avril 2008
Messages : 2 582
Détails du profil
Informations personnelles :
Nom : Homme Romain VALERI
Âge : 35
Localisation : France, Meurthe et Moselle (Lorraine)

Informations professionnelles :
Activité : POOête

Informations forums :
Inscription : avril 2008
Messages : 2 582
Points : 4 088
Points : 4 088
Non, attends, je crois que tu prends le problème à l'envers

Si tu veux qu'un fragment de code JS soit exécuté lors de l'interprétation de ta page, mets le à la fin de ton code HTML, entre balises script, c'est plus simple ^^ Non ?
__________________

...pour les linguistes et les curieux >>> générateur de phrases aléatoires

__________________
RomainVALERI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/01/2012, 20h53   #10
Invité de passage
 
Homme
Étudiant
Inscription : juin 2011
Messages : 8
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Côte d'Or (Bourgogne)

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2011
Messages : 8
Points : 0
Points : 0
Oh! Merci beaucoup,c'est tout con et ça fonctionne!

Il fallait juste y penser...

Merci milles fois
Jeremy Lepretre est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 04h01.


 
 
 
 
Partenaires

Hébergement Web