ca me rassure je suis pas trop bete .... c'est ce que j'ai fait...
faut quand meme savoir que quand je met le code "en brut" dans le onChange ca marche mais pas quand je met dans la fonction ca marche pas voila mon code dans le onload :
Chaque valXX correspond a un champ et chaque lettre correspond a une liste deroulante.
function data(var val10, var val11, var val12, var val20, var val21, var val22, var val30, var val31, var val32,
var val40, var val41, var val42, var val50, var val51, var val52, var i, var j, var k, var l, var m, var n,
var o, var p, var q, var r, var s, var t, var u, var v, var w) {
//Variable temporaire
var actuel = 0;
var potentiel = 0;
var toto = 'toto';
//Procédure pour lignes data orange
if (i == toto){
actuel = actuel + val10;
}else{
if(i != null){potentiel= potentiel + val10;}
}
if (j == toto){
actuel = actuel + val11;
}else{
if(j != null){potentiel= potentiel + val11;}
}
if (k == toto){
actuel = actuel + val12;
}else{
if(k != null){potentiel = potentiel + val12;}
}
//Procédure pour ligne data bouygues tel
if (l == toto){
actuel =actuel + val20;
}else{
if(l != null){potentiel=potentiel + val20;}
}
if (m == toto){
actuel =actuel + val21;
}else{
if(m != null){potentiel=potentiel + val21;}
}
if (n == toto){
actuel =actuel + val22;
}else{
if(n != null){potentiel=potentiel + val22;}
}
//Procédure pour lignes data global SFR
if (o == toto){
actuel =actuel + val30;
}else{
if(o != null){potentiel=potentiel + val30;}
}
if (p == toto){
actuel =actuel + val31;
}else{
if(p != null){potentiel=potentiel + val31;}
}
if (q == toto){
actuel =actuel + val32;
}else{
if(q != null){potentiel=potentiel + val32;}
}
//Procédure pourlignes data pc card
if (r == toto){
actuel =actuel + val40;
}else{
if(r != null){potentiel=potentiel + val40;}
}
if (s == toto){
actuel =actuel + val41;
}else{
if(s != null){potentiel=potentiel + val41;}
}
if (t == toto){
actuel =actuel + val42;
}else{
if(t != null){potentiel=potentiel + val42;}
}
if (u == toto){
actuel =actuel + val50;
}else{
if(u != null){potentiel=potentiel + val50;}
}
if (v == toto){
actuel =actuel + val51;
}else{
if(v != null){potentiel=potentiel + val51;}
}
if (w == toto){
actuel =actuel + val52;
}else{
if(w != null){potentiel=potentiel + val52;}
}
crmForm.all.champs1.DataValue=actuel;
crmForm.all.champs2.DataValue=potentiel;
}
De plus, j'ai essayer de passer via des vavriable globale (en mettant des this devant chaque variable de ma fonction) en faisant l'appel de fonction comme ca : data() et en prenant les valeurs de mes variable au debut de mon onchange
PS:Pitié, j'en ai marre de faire des copier coller il me reste 500 ou 600 champs a mettre des truc comme ca avec du code pas du tout répétitif snif
PS2 : 50 ou 60 en fait 500 ca fait beaucoup
++
"Aucun de nous ne sait ce que nous savons tous, ensemble." Lao Tseu inventeur du "copier coller" [8D]