Bonjour à tous,
Voila un petit post qui vient exposer mon incompétence en javascript.
Je suis entrain de mettre en place un comparateur de fichier de configuration, qui après analyse, renvoi les comparaisons dans un grand tableau html avec des jeu de couleurs pour voir les parametres identique/différents ou abs.
Le tableau pouvant s'étendre sur plus de 50 colonnes et 300 lignes, il est bon de supprimer toutes les lignes qui sont vertes(toutes les lignes ou les clés sont identiques) pour ne laisser afficher que les lignes ou il y a au moins un parametre différent(orange) ou absent(rouge).
Et donc pour faire cela, je n'ai pas trouver plus sucidaire que le javascript !
voici un exemple type du tableau html.
Code html : 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
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 <table border=1 bgcolor=#D3D3D3 bordercolor="#000000"> <tr> <td><b>Section</b></td> <td><b>Clé</b></td> <td><b>config1.ini</b></td> <td><b>config2.ini</b></td> <td><b>config3.ini</b></td> </tr> <tr> <td style='background-color:#D3D3D3;'>section1</td> <td style='background-color:#D3D3D3;'>clé 1</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#FF9933;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section1</td> <td style='background-color:#D3D3D3;'>clé 2</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#FF9933;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section1</td> <td style='background-color:#D3D3D3;'>clé 3</td> <td style="background-color:#FF9933;">xxx</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section1</td> <td style='background-color:#D3D3D3;'>clé 4</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section1</td> <td style='background-color:#D3D3D3;'>clé 5</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section2</td> <td style='background-color:#D3D3D3;'>clé 1</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#FF9933;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section2</td> <td style='background-color:#D3D3D3;'>clé 2</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#FF9933;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section2</td> <td style='background-color:#D3D3D3;'>clé 3</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#FF9933;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section2</td> <td style='background-color:#D3D3D3;'>clé 4</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> <tr> <td style='background-color:#D3D3D3;'>section2</td> <td style='background-color:#D3D3D3;'>clé 5</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> <td style="background-color:#33CC00;">xxx</td> </tr> </table>
Le but étant donc de réafficher le tableau avec les lignes vertes en moins et sans recharger la page.
!
Partager