I’m developing an internal monitoring site for gateways (GW), but I’m facing some challenges. Some GWs display call data using the following HTML structure:
<th class="route">Totais</th>
<th class="calling"></th>
<th class="conn"></th>
<th class="talking">20</th>
<th class="tot">20</th>
In my system, I extract data from the <th class="tot">
field.
However, other GWs load data dynamically through a variable in JavaScript, making direct access difficult. Here’s the code snippet from these GWs:
<script language="javascript">
var dados = 'dados.html';
$(tabela).load(dados);
setInterval(function() {
$(tabela).load(dados);
}, 2000);
</script>
Is there any way to access the data or query it directly from the source?
I appreciate your help and look forward to any solutions or recommendations you may have.
I integrated AJAX to fetch total calls from each gateway’s HTML and store them in a global variable. I expected the data to load dynamically every 5 seconds and display the correct call totals in the corresponding boxes on the webpage.