2010-12-27 12:41:33 -05:00
|
|
|
// Bryan Schumaker (12 / 27 / 2010)
|
|
|
|
|
2010-12-27 12:45:23 -05:00
|
|
|
function set_attr(attr, id)
|
2010-12-27 12:41:33 -05:00
|
|
|
{
|
|
|
|
var req = new XMLHttpRequest();
|
|
|
|
req.onreadystatechange = function()
|
|
|
|
{
|
|
|
|
if (req.readyState == 4 && req.status == 200)
|
|
|
|
{
|
2010-12-27 12:45:23 -05:00
|
|
|
document.getElementById(id).innerHTML = req.responseText;
|
2010-12-27 12:41:33 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
req.open('GET', "controls.py?a=" + attr, true)
|
|
|
|
req.send()
|
2010-12-27 12:45:23 -05:00
|
|
|
setTimeout("set_attr(\"" + attr + "\", \"" + id + "\")", 3000)
|
2010-12-27 12:41:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
function do_request(action)
|
|
|
|
{
|
|
|
|
var http = new XMLHttpRequest();
|
|
|
|
http.open('GET', "controls.py?a=" + action, true);
|
|
|
|
http.send();
|
|
|
|
return http;
|
|
|
|
}
|