Skip to content
Snippets Groups Projects
Commit 653fd8b3 authored by khawkins98's avatar khawkins98
Browse files

Don't use a synchronous request #127

parent a39382c3
No related branches found
No related tags found
No related merge requests found
......@@ -422,14 +422,21 @@ function ebiFrameworkIncludeAnnouncements() {
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
eval(xmlhttp.responseText);
detectAnnouncements(m);
xmlhttp.open("GET", file, true);
xmlhttp.onload = function (e) {
if (xmlhttp.readyState === 4) {
if (xmlhttp.status === 200) {
eval(xmlhttp.responseText);
detectAnnouncements(m);
} else {
console.error(xmlhttp.statusText);
}
}
}
xmlhttp.open("GET", file, false);
xmlhttp.send();
};
xmlhttp.onerror = function (e) {
console.error(xmlhttp.statusText);
};
xmlhttp.send(null);
}
if (window.location.hostname.indexOf('wwwdev.') === 0) {
......
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