Revision 98509219
Added by Scott Ullrich over 16 years ago
usr/local/www/javascript/index/sajax.js | ||
---|---|---|
87 | 87 |
gateways_split = x.split(","); |
88 | 88 |
var counter = 1; |
89 | 89 |
for (var y=0; y<gateways_split.length-1; y++){ |
90 |
document.getElementById('gateway' + counter).innerHTML = gateways_split[y]; |
|
91 |
counter++; |
|
90 |
if($('gateway' + counter)) { |
|
91 |
document.getElementById('gateway' + counter).innerHTML = gateways_split[y]; |
|
92 |
counter++; |
|
93 |
} |
|
92 | 94 |
} |
93 | 95 |
} |
94 | 96 |
} |
... | ... | |
98 | 100 |
statistics_split = x.split(","); |
99 | 101 |
var counter = 1; |
100 | 102 |
for (var y=0; y<statistics_split.length-1; y++){ |
101 |
document.getElementById('stat' + counter).innerHTML = statistics_split[y]; |
|
102 |
counter++; |
|
103 |
if($('stat' + counter)) { |
|
104 |
document.getElementById('stat' + counter).innerHTML = statistics_split[y]; |
|
105 |
counter++; |
|
106 |
} |
|
103 | 107 |
} |
104 | 108 |
} |
105 | 109 |
} |
Also available in: Unified diff
Ensure that the gateway widget exists before populating data during ajax calls.