Failed to display a message in a div but shown in console
Hello
I have a page where I can add an organisation. But I dont want to add org with the same name ofc so I have some validation. Now the problem is, it doesnt show the message in the error div i created. It does get logged fine in the console though.
here is the codepen with the html and js
https://codepen.io/Aman-sghh/pen/GRbpKKz
3 Replies
and whats interesting is that same logic works on a different page
bit hard to trouble shoot without working code. but in your
showAlert
function you are selecting an element with it id alert-container
. I can not see that element on your pageYeah that was issue😁 . I thought I had added but it was only in the js code. Silly mistake