Create handler for form submit

This commit is contained in:
Bálint Bokros 2017-11-27 19:00:38 +01:00
parent 982f72b4ba
commit 5a295de426

View File

@ -11,7 +11,17 @@ $('#container').on('click', '.anchor', ( function (event) {
console.log(data);
ws.send(data);
}));
$('form#anchor_login_event').on('submit', (function (event) {
event.preventDefault();
let anchorName = $(this).attr('id').replace('_event', '');
$.post(
$(this).attr('action'),
$(this).serialize(),
function (data) {}
);
}));
}));
ws.onmessage = function (messageEvent) {