Initial state
This commit is contained in:
20
js/horarios_profesor.js
Normal file
20
js/horarios_profesor.js
Normal file
@@ -0,0 +1,20 @@
|
||||
document.getElementById('form').addEventListener('submit', async function (e) {
|
||||
e.preventDefault();
|
||||
const formData = new FormData(this);
|
||||
try {
|
||||
const response = await fetch('action/action_horario_profesor.php', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
const data = await response.json();
|
||||
|
||||
if (data.status == 'ok') {
|
||||
|
||||
}
|
||||
else {
|
||||
triggerMessage(data.message, 'Error en la consulta', 'warning');
|
||||
}
|
||||
} catch (error) {
|
||||
triggerMessage('Fallo al consutar los datos ', 'Error', 'danger');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user