Bonsoir,

Je voudrais ajouter une barre de progression dans la fonction charger_galerie.
Est-ce que c'est possible et comment ?

Merci pour votre aide.

Salutations

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
function js_charger_galerie(annee,sujet,galerie,n) 
{
	var i = 0;
	var j = 1;
	var nom_fichier="000";
	var chemin = "/photos/" + annee + "/" + sujet + "/" + galerie + "/photos-diapo/";
	var chemin2 = "/photos/" + annee + "/" + sujet + "/" + galerie + "/photos/";
 
	nb_photos = n;
 
	while (i<nb_photos)
	{
		liste_photos[i] = new Image();
		liste_photos[i].src = chemin + nom_fichier.substr(0,nom_fichier.length-j.toString(10).length) + j + ".jpg";
				liste_photos[i].alt = ""+ nom_galerie + " - " + j + "/" + nb_photos;
				liste_photos[i].title = ""+ nom_galerie + " - " + j + "/" + nb_photos;
		src_grandes_photos[i] = chemin2 + nom_fichier.substr(0,nom_fichier.length-j.toString(10).length) + j + ".jpg";
 
		i++;
		j++;
		//alert('i');
	}
}