annot read property 'getElementsByClassName' of null
var header = document.getElementById("heart"); var btns = header.getElementsByClassName("btn"); for (var i = 0; i < btns.length; i++) { btns[i].addEventListener("click", function() { var current = document.getElementsByClassName("active"); current[0].className = current[0].className.replace(" active", ""); this.className += " active"; }); }
if (isset($arr['BName'][$i])) { echo '<td>' . $arr['BName'][$i] . '<button style="text-align:right;float:right;" class="favourites" id="' . $arr['BName'][$i] . '" value="' . $dbRow["UserID"] . '<button class="btn" id="heart">❤️</div></button></td>'; } else {
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)