Checkboxes check (with alert)

This commit is contained in:
Verena Schulz
2025-11-12 17:39:02 +01:00
parent d9e96316c0
commit a32e7e5744
2 changed files with 21 additions and 6 deletions
+20 -5
View File
@@ -23,12 +23,27 @@ manualBtn.addEventListener('click', () => {
});
submitBtn.addEventListener('click', () => {
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
});
//function to check if one checkbox is at least klicked
function checkBoxes() {
const checkboxes = document.querySelectorAll('input[name="docFormat"]');
let isChecked = false;
checkboxes.forEach(function(checkbox){
if(checkbox.checked){
isChecked = true;
}
});
if(isChecked){
//Code to submit the video
} else {
//language only english at the moment
alert('Please select at least one document type.');
}
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
}
//language changing feature
function changeLanguage(language) {
if (language === 'en') {
document.getElementById('title').textContent = 'Video to document';