Improved www.ttss.krakow.pl
Jacek Kowalski
2016-12-08 e54544ac581bb239acf4da088bbca7b5ff0f3371
Hide error message on successful AJAX response
1 files modified
5 ■■■■■ changed files
index.js 5 ●●●●● patch | view | raw | blame | history
index.js
@@ -123,6 +123,10 @@
    }
}
function fail_hide() {
    alert.style.display = 'none';
}
function loadTimes(stopId = null, clearRoute = false) {
    if(!stopId) stopId = stop_id;
    if(!stopId) return;
@@ -231,6 +235,7 @@
        }
        
        startTimer(new Date());
        fail_hide();
        
        times_timer = setTimeout(function(){ loadTimes(); }, ttss_refresh);
    }).fail(fail_ajax);