Commit 5759f046 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

next status request only after previous response is received

parent 23bac812
...@@ -413,7 +413,7 @@ function process_recording(xmldoc) { ...@@ -413,7 +413,7 @@ function process_recording(xmldoc) {
var file_name = xmldoc.getElementsByTagName('file_name')[0].firstChild.data; var file_name = xmldoc.getElementsByTagName('file_name')[0].firstChild.data;
if (state=='"stopped"'){ if (state=='"stopped"'){
clearInterval(update_intvl); clearTimeout(update_intvl);
} else { } else {
var frame_period = 0; var frame_period = 0;
var rates = xmldoc.getElementsByTagName('frame_period'); var rates = xmldoc.getElementsByTagName('frame_period');
...@@ -427,8 +427,8 @@ function process_recording(xmldoc) { ...@@ -427,8 +427,8 @@ function process_recording(xmldoc) {
} else { } else {
frame_period = 1000; frame_period = 1000;
} }
clearInterval(update_intvl); clearTimeout(update_intvl);
update_intvl = setInterval(update_state, frame_period); update_intvl = setTimeout(update_state, frame_period);
} }
//Update HTML //Update HTML
document.getElementById('ajax_state').innerHTML = state.substring(1, state.length-1); document.getElementById('ajax_state').innerHTML = state.substring(1, state.length-1);
...@@ -536,8 +536,8 @@ function toggle_recording() { ...@@ -536,8 +536,8 @@ function toggle_recording() {
document.getElementById('record_text').innerHTML = "<img src=\"images/stop.gif\" style=\"position:relative; bottom:-5px;\"> STOP"; document.getElementById('record_text').innerHTML = "<img src=\"images/stop.gif\" style=\"position:relative; bottom:-5px;\"> STOP";
document.getElementById('sitecoloumn').style.backgroundColor = "#AF2020"; document.getElementById('sitecoloumn').style.backgroundColor = "#AF2020";
clearInterval(update_intvl); clearTimeout(update_intvl);
update_intvl = setInterval(update_state,1000); update_intvl = setTimeout(update_state,1000);
} }
//update_state(); //update_state();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment