-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathloading.html
32 lines (32 loc) · 1.01 KB
/
loading.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
<head>
<script>
function pingServer(){
console.log("pinging");
xhr = new XMLHttpRequest();
var url = "http://127.0.0.1:8000/simulate/SimulationInput/";
xhr.open("CHECKSTART", url, true);
xhr.setRequestHeader("Content-type", "application/json");
xhr.onreadystatechange = function() {
if (xhr.responseText == "OK"){
window.location.href = 'http://127.0.0.1:8000/simulate/';
}
};
xhr.send();
};
window.setInterval(function(){
pingServer();
}, 500);
</script>
<style>
body{
background-color: rgb(26, 26, 26);
}
</style>
</head>
<body class="html">
<div style="margin-top: 400px;">
<center><h1 style="color: white;">Loading...</h1></center>
</div>
</body>
</html>