Bonjour,
J'aimerais convertir ceci;
En VB
// Parses the xmlResponse from status.xml and updates the status box
function updateStatus(xmlData) {
// Check if a timeout occurred
if(!xmlData)
{
document.getElementById('display').style.display = 'none';
document.getElementById('loading').style.display = 'inline';
return;
}
// Make sure we're displaying the status display
document.getElementById('loading').style.display = 'none';
document.getElementById('display').style.display = 'inline';
// Loop over all the LEDs
for(i = 0; i < 8; i++) {
if(getXMLValue(xmlData, 'led'+i) == '1')
document.getElementById('led' + i).style.color = '#090';
else
document.getElementById('led' + i).style.color = '#ddd';
}
// Loop over all the buttons
for(i = 0; i < 4; i++) {
if(getXMLValue(xmlData, 'btn'+i) == 'up')
document.getElementById('btn' + i).innerHTML = '0';
else
document.getElementById('btn' + i).innerHTML = '1';
}
// Update analog value
document.getElementById('an1').innerHTML = getXMLValue(xmlData, 'an1');
document.getElementById('an2').innerHTML = getXMLValue(xmlData, 'an2');
// Update the time value
document.getElementById('time0').innerHTML = getXMLValue(xmlData, 'time0');
}
setTimeout("newAJAXCommand('status.xml', updateStatus, true)",500);
MERCI !
Ps; je possède le status.xml.
---------------
il n'y ya pas d'arnaque sans pigeon =)