I added a glyphicon element to my page but set its visibility to hidden using CSS. My goal is to reveal the glyphicon (#gl1) when users input text and click the "post" button, but I'm encountering an issue where the glyphicon doesn't show up when triggered by JavaScript. I'm not sure why this is happening.
Here is my code: My CSS :
<html>
<head>
...
</head>
In my HTML elements, upon clicking the "post" button with id="post", the glyphicon should become visible...
<body>
...
JS Code :
<script>
function ClickPost(){
...
}
</script>
...
</body>
</html>
Upon checking the console, I see the following error message: Uncaught TypeError: Cannot read property 'style' of undefined at ClickPost (Post edit and delete.html:94) at HTMLButtonElement.onclick (Post edit and delete.html:67). Can someone please assist me with this issue?