I have a problem with HTML and JS... I made a function with parameter, parameter should be ID of HTML element. But my function take that value, and function getElementById can't read that value. I make a test with console log, and I will show you that on image.
JS Function
function HideShowElementDeleteFolder(id){
var x = document.getElementById(id);
console.log(x);
console.log(id);
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
Calling JS function in HTML
<a class="text-danger" onclick="HideShowElementDeleteFolder('<?php echo $value; ?>')">
<i class="fas fa-times"></i>
</a>
HTML Element what I want to show on click
<div id="<?php $value; ?>" class="widget-header clearfix" style="display:none;">
<form action="" method="post">
<div>
<a href="dashboard-files.php?folder=<?php echo $value; ?>">
<button type="submit" class="btn btn-primary mt-2 mb-2">Obrisi folder</button>
</a>
</div>
</form>
</div>