Commit b74173c0 authored by Eric Duminil's avatar Eric Duminil
Browse files

Check checked inputs

No related merge requests found
Showing with 4 additions and 7 deletions
+4 -7
......@@ -364,15 +364,12 @@ var regionChooser = (function(){
publicScope.clickety_click = function() {
console.log("You clicked pretty well");
var checkboxes = document.querySelectorAll("input.select_citygml");
if (checkboxes.length === 0){
//FIXME: Wrong. There are at least one checkbox.
var checkedBoxes = Array.from(document.querySelectorAll("input.select_citygml")).filter(x => x.checked);
if (checkedBoxes.length === 0){
console.log("You should select at least one citygml, though.");
} else{
checkboxes.forEach(x => {
if (x.checked){
console.log("Nice! You checked Citygml " + x.id)
}
checkedBoxes.forEach(x => {
console.log("Nice! You checked Citygml " + x.id)
});
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment