abracadabraPDF › Forums › PDF – Général › Afficher/masquer de champs suivants un champs total. – RÉSOLU › Répondre à : Afficher/masquer de champs suivants un champs total. – RÉSOLU
Supprime ce qui est en rouge :
a = this.getField(« ligne1.6 »).value;
b = this.getField(« ligne2.6 »).value;
c = this.getField(« ligne3.6 »).value;
d = this.getField(« ligne4.6 »).value;
e = this.getField(« ligne5.6 »).value;
somtotal = a+b+c+d+e;
event.target.value = somtotal ;
if (event.target.value < "15000")
{
this.getField(« valdg »).display = display.hidden;
}
else if (event.target.value >= « 15000 »)
{
this.getField(« valdg »).display = display.visible;
}
else if (event.target.value >= « 50000 »)
{
this.getField(« valpdg »).display = display.visible;
}
« if » + « else if » ça teste une condition ou sinon une autre jusqu’à ce qu’une condition soit remplie et ça s’arrête là.
« if » + « if » + « if » ça teste une condition, et une autre, et une autre, etc.
Indépendamment du résultat de chacune.
Mais je laisse la parole à Alex…
:joker:
