https post
This commit is contained in:
parent
d61db9e56e
commit
613c95486b
@ -28,6 +28,7 @@
|
||||
<div>
|
||||
<input type="hidden" name="classes_code" id="classes_code" value="{{ $classes_code }}" required>
|
||||
</div>
|
||||
<div> Stan połączenia z serwerem legitymacji: <span id="status" style="color:green"> połączony</span></div>
|
||||
<div>
|
||||
<label for="student_id_number"> Nr indeksu: </label>
|
||||
<input type="number" name="student_id_number" id="student_id_number" required>
|
||||
@ -47,9 +48,12 @@
|
||||
<script>
|
||||
var classes_code_input = $('#classes_code_input').html();
|
||||
const client = new WebSocket('wss://atcheck.projektstudencki.pl/wss', classes_code_input);
|
||||
|
||||
client.onclose = function(event) {
|
||||
console.log("WebSocket is closed now.");
|
||||
$('#status').innerHTML = " rozłączony";
|
||||
$('#status').css("color", "red");
|
||||
};
|
||||
|
||||
client.onmessage = function onmessage1(message) {
|
||||
message = JSON.parse(message.data);
|
||||
if (message.type = "data") {
|
||||
|
Loading…
Reference in New Issue
Block a user