0
JavaScript: Know which article?
Hey there! I am building a website with articles where users can write comments to each article (comments stored on firebase). In order to add/retrieve the comments to/from the related node (there's a node for each article containing its appertaining comments), the script needs to know on which page/which article it is. How would that work? Thanks, Ltzu
2 Antworten
+ 1
Perhaps you could use window.location to get the pathname of the article's HTML file and store it with the comments.
+ 1
@James
Seems to be a god solution, thanks a lot! :)