34625-vm/assets/js/main.js
Flatlogic Bot 5e6f0c0b7a Inicial
2025-10-03 12:46:21 +00:00

16 lines
652 B
JavaScript

// In the future, we can add interactivity here, for example, form validation or dynamic table updates.
document.addEventListener('DOMContentLoaded', function () {
// Example: Client-side validation for the add client form
const addClientForm = document.getElementById('addClientForm');
if (addClientForm) {
addClientForm.addEventListener('submit', function (event) {
const nameInput = document.getElementById('name');
if (nameInput.value.trim() === '') {
alert('Client name is required.');
event.preventDefault(); // Stop form submission
}
});
}
});