Hola a todos, el problema es el siguiente, soy nuevo usando este lenguaje, quiero interpretar que hace el programa a continuación. Es un programa que se comunica con un dispositivo externo y hace prender unos leds y lee unos botones(creo)...pero no comprendo las funciones y métodos que usa. Soy estudiante de electronica...y estoy iniciandome en lenguajes de alto nivel. Cualquier ayuda o recomendacion es bienvenida...desde ya gracias.
script type="text/javascript">
<!--
// Parses the xmlResponse from status.xml and updates the status box
function updateStatus(xmlData) {
var mainstat = document.getElementById('display').style…
var loadstat = document.getElementById('loading').style…
// Check if a timeout occurred
if(!xmlData)
{
mainstat = 'none';
loadstat = 'inline';
return;
}
// Make sure we're displaying the status display
mainstat = 'inline';
loadstat = 'none';
// Loop over all the LEDs
for(i = 0; i < 8; i++)
document.getElementById('led' + i).style.color = (getXMLValue(xmlData, 'led' + i) == '1') ? '#090' : '#ddd';
// Loop over all the buttons
for(i = 0; i < 4; i++)
document.getElementById('btn' + i).innerHTML = (getXMLValue(xmlData, 'btn' + i) == 'up') ? 'Λ' : 'V';
// Update the POT value
document.getElementById('pot0').inner… = getXMLValue(xmlData, 'pot0');
}
setTimeout("newAJAXCommand('status.xml… updateStatus, true)",500);
//-->
</script>
<script type="text/javascript">
script type="text/javascript">
<!--
// Parses the xmlResponse from status.xml and updates the status box
function updateStatus(xmlData) {
var mainstat = document.getElementById('display').style…
var loadstat = document.getElementById('loading').style…
// Check if a timeout occurred
if(!xmlData)
{
mainstat = 'none';
loadstat = 'inline';
return;
}
// Make sure we're displaying the status display
mainstat = 'inline';
loadstat = 'none';
// Loop over all the LEDs
for(i = 0; i < 8; i++)
document.getElementById('led' + i).style.color = (getXMLValue(xmlData, 'led' + i) == '1') ? '#090' : '#ddd';
// Loop over all the buttons
for(i = 0; i < 4; i++)
document.getElementById('btn' + i).innerHTML = (getXMLValue(xmlData, 'btn' + i) == 'up') ? 'Λ' : 'V';
// Update the POT value
document.getElementById('pot0').inner… = getXMLValue(xmlData, 'pot0');
}
setTimeout("newAJAXCommand('status.xml… updateStatus, true)",500);
//-->
</script>
<script type="text/javascript">