summaryrefslogtreecommitdiffstats
path: root/usr/local/www/javascript/index/sajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/javascript/index/sajax.js')
-rw-r--r--usr/local/www/javascript/index/sajax.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/local/www/javascript/index/sajax.js b/usr/local/www/javascript/index/sajax.js
index 20da997..ffe1843 100644
--- a/usr/local/www/javascript/index/sajax.js
+++ b/usr/local/www/javascript/index/sajax.js
@@ -87,8 +87,10 @@ function updateGatewayStats(x){
gateways_split = x.split(",");
var counter = 1;
for (var y=0; y<gateways_split.length-1; y++){
- document.getElementById('gateway' + counter).innerHTML = gateways_split[y];
- counter++;
+ if($('gateway' + counter)) {
+ document.getElementById('gateway' + counter).innerHTML = gateways_split[y];
+ counter++;
+ }
}
}
}
@@ -98,8 +100,10 @@ function updateInterfaceStats(x){
statistics_split = x.split(",");
var counter = 1;
for (var y=0; y<statistics_split.length-1; y++){
- document.getElementById('stat' + counter).innerHTML = statistics_split[y];
- counter++;
+ if($('stat' + counter)) {
+ document.getElementById('stat' + counter).innerHTML = statistics_split[y];
+ counter++;
+ }
}
}
}
OpenPOWER on IntegriCloud