CS Discoveries App Lab Check boxes

My student is trying to use check boxes on one the ‘selection’ page to trigger maps on the maps page. When the check box is checked, the map works, but when the user unchecks, the map doesn’t change. Any help would be appreciated!

Great start on this app! Also you named things well and that made it easy to read.

You have the code that shows the element, but don’t have any code to hide the element again. Once you show it, it will stay until you hide it.

There is usually more than one way to solve these kind of problems. One way would be to hide all the checks and all the locations on the map when you go back to the search page. I believe that would be in the “map_back” event. Then if the user wants to do a new search they don’t need to unclick the old search boxes, but only click the new ones.

Another solution would be to add code to hide each element when the checkbox is clicked another time like this. You will need to do this for each checkbox and element.

1 Like

thank you! My student and I found this very helpful. I didn’t think about putting a handler inside a handler for this purpose.

1 Like