noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 21/27: Ajout fonction pour calculer pourcent


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 21/27: Ajout fonction pour calculer pourcentage répartition clef
Date: Thu, 02 Oct 2014 14:23:16 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 7fbb56438e21957c6ccd631a9df366297057d308
Author: Dany De Bontridder <address@hidden>
Date:   Thu Sep 18 15:09:13 2014 +0200

    Ajout fonction pour calculer pourcentage répartition clef
---
 html/js/anc_script.js |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/html/js/anc_script.js b/html/js/anc_script.js
index d75d48e..efef197 100644
--- a/html/js/anc_script.js
+++ b/html/js/anc_script.js
@@ -524,4 +524,26 @@ function add_row_key(p_table)
         }
     }
     $('total_key').innerHTML="?";
+}
+function anc_key_compute_table()
+{
+    var tot=0;
+    var i=0;
+    var value=0;
+    var percent=document.getElementsByName('percent[]');
+    for (i=0;i<percent.length;i++)
+    {
+        console.log(percent[i].value);
+        value=percent[i].value;
+        if ( value == 'undefined')
+        {
+            value=0;
+        }
+        if ( isNaN(value)) {
+            value=0;
+        }
+        tot=tot+Math.round(value*100)/100;
+    }
+    $('total_key').innerHTML=Math.round(tot*100)/100;
+
 }
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]