15 lines
442 B
JavaScript
15 lines
442 B
JavaScript
const seasonTextbox = document.getElementById('season-textbox');
|
|
const submitButton = document.getElementById('submit-button');
|
|
|
|
async function checkDataValidity() {
|
|
let dataIsValid = true;
|
|
|
|
if(seasonTextbox.value == "") dataIsValid = false;
|
|
|
|
submitButton.disabled = !dataIsValid;
|
|
}
|
|
checkDataValidity();
|
|
|
|
seasonTextbox.addEventListener('keyup', checkDataValidity);
|
|
seasonTextbox.addEventListener('change', checkDataValidity);
|