+ 2
Bug in code
There is a bug in the clear function .every time it is pressed,the page becomes blank.When I tried to run the code on a browser,the page reloaded and function worked perfectly as expected.Any sugestions will be welcome https://code.sololearn.com/WsgW7AMuwlzS/?ref=app
5 Réponses
+ 2
you can fix it by moving the buttons out of the form and renaming your "clear()" function to something else like cleared() , apparently it is conflicting with some built-in function in scope.
I made those changes and it worked without reloading the page.
https://code.sololearn.com/Wckn5qC6EDuc/?ref=app
+ 2
thanks
+ 2
thanks again
+ 1
do u have any recomendations on how to remove the border when the clear button is pressed???
+ 1
add to cleared()
document.getElementById("presentees_box").style.display ="none";
document.getElementById("absentees_box").style.display ="none";
and
document.getElementById("presentees_box").style.display ="";
document.getElementById("absentees_box").style.display ="";
to myFunction()
check my code above for the changes