var AfficherMiseAJour_timer; var AfficherMiseAJour_decomptage = -1; function AfficherMiseAJour_maj(json) { var positionFirmware = json['positionFirmware']; var positionMaxFirmware = json['positionMaxFirmware']; var libelle = json['libelle']; $('#affichageMiseAJour>progress').attr('max', positionMaxFirmware); $('#affichageMiseAJour>progress').val(positionFirmware); $('#affichageMiseAJour>div').html(libelle); AfficherMiseAJour_decomptage = 5; $('#affichageMiseAJour:hidden').show(); } function AfficherMiseAJour_majAffichage() { if (AfficherMiseAJour_decomptage>0) { AfficherMiseAJour_decomptage --; } else { if (AfficherMiseAJour_decomptage==0) { $('#affichageMiseAJour:visible').hide(); AfficherMiseAJour_decomptage --; } } } $(function() { AfficherMiseAJour_timer = setInterval(AfficherMiseAJour_majAffichage, 1000); });