- 1
How to make a commenting system with just javascript?
Yeah, the question is on the top
1 Answer
+ 4
With just JS on user side, you can't: you need to send such comments to a server wich handle a database, save them, so next time the page is requested you can dynamically (on server side) build a new version of the page, with cooments posted by all users...
However, you can use just JS by two ways:
+ using JS at server side rather than common Php
+ stay to user side by using a third party database service, such firebase: ( https://firebase.google.com )
... and in all case, to communicate with server side and your database, you will be advised to use XMLHttpRequest object/API (or some framework binding it) if not mandatory (in most of third party service, I guess), rather than basic basic communication through Html common requests and load pages (classical old form data and cookies way for exchanging them with server):
https://www.w3schools.com/xml/xml_http.asp