Im learning JS. Found a good video “JavaScript Programming – Full Course” and stucked at the 2nd part where I need to use DOM. I have the HTML document, in i refered to the JS file. Other stuff working well, but this: let messageEL = document.getElementById(“message-el”) Always get this error: ReferenceError: document is not defined I installed live server, and
Tag: document
Detecting if a button has been pressed on the whole document
I want to detect if a button has been pressed on a document. That means I don’t want to put in document.getElementById(“ID”).onclick for each button. In other words, i want to detect if ANY button has been pressed on the document. If a button is pressed, get that button object, get it’s textContent and that’s all there is to it.
How can I count in Firebase the collections in a document
I know how to count how many Documents are in a collection in Firebase but how does it work the other way around. I have several collections in a document and I need to find out how many. (In my example it would be 2) My Setup: I tried the following but it does not work: Does anybody know how