don't halt the page load while waiting for this
This commit is contained in:
parent
ed4b62dc71
commit
15f78d9883
1 changed files with 13 additions and 11 deletions
|
@ -228,18 +228,20 @@ class Setup extends SimpleExtension {
|
|||
checkbox.disabled = true;
|
||||
out_span.innerHTML = '(testing...)';
|
||||
|
||||
http_request = getHTTPObject();
|
||||
http_request.open('GET', '$test_url', false);
|
||||
http_request.send(null);
|
||||
$(document).ready(function() {
|
||||
http_request = getHTTPObject();
|
||||
http_request.open('GET', '$test_url', false);
|
||||
http_request.send(null);
|
||||
|
||||
if(http_request.status == 200 && http_request.responseText == 'ok') {
|
||||
checkbox.disabled = false;
|
||||
out_span.innerHTML = '(tested ok)';
|
||||
}
|
||||
else {
|
||||
checkbox.disabled = true;
|
||||
out_span.innerHTML = '(test failed)';
|
||||
}
|
||||
if(http_request.status == 200 && http_request.responseText == 'ok') {
|
||||
checkbox.disabled = false;
|
||||
out_span.innerHTML = '(tested ok)';
|
||||
}
|
||||
else {
|
||||
checkbox.disabled = true;
|
||||
out_span.innerHTML = '(test failed)';
|
||||
}
|
||||
});
|
||||
</script>";
|
||||
$sb = new SetupBlock("General");
|
||||
$sb->position = 0;
|
||||
|
|
Reference in a new issue