hey frnds...m designing a website...n want to add a small comment box for visitors....plzz let me knw which scripting languages allow me to do so, except php as m nt comfortable wid it.....:(
thanks..:)
hey frnds...m designing a website...n want to add a small comment box for visitors....plzz let me knw which scripting languages allow me to do so, except php as m nt comfortable wid it.....:(
thanks..:)
As ’s original question implies, the visible comment box is just page markup; several replies (notably and ) already point out that persisting comments needs either a backend or a hosted widget solution (as mentioned by , and ). Two clear routes exist: a zero-maintenance hosted widget, or a lightweight self-hosted endpoint that accepts and stores POSTed comments. Hosted widgets trade control for convenience; a custom endpoint gives full control over storage, moderation and privacy.
A minimal self-hosted workflow: 1) render an accessible form on the page, 2) POST the submitted text to a small API endpoint, 3) server-side: validate, sanitize, and store the comment (DB or flat file), and 4) render comments server-side or return JSON for client-side insertion. Progressive enhancement is useful so the form still works if JavaScript is disabled.
Example (front-end skeleton):
<form id="commentForm" method="post" action="/comments">
<label for="comment">Comment</label>
<textarea id="comment" name="comment" rows="4" required></textarea>
<button type="submit">Post</button>
</form>
<script>
document.getElementById('commentForm').addEventListener('submit', async function(e) {
e.preventDefault();
const text = document.getElementById('comment').value;
const res = await fetch('/api/comments', {
method: 'POST',
headers: {'Content-Type':'application/json'},
body: JSON.stringify({comment: text})
});
if (res.ok) { / append new comment to DOM or reload / }
});
</script>
Key cautions and tips: always sanitize on the server and escape when rendering to prevent XSS; add spam protections (honeypot field, rate limits or CAPTCHA); consider a moderation queue for first-time posters; store only needed personal data and note any privacy obligations. For low-ops setups, serverless functions (single endpoint) plus a small managed datastore often hit the sweet spot between simplicity and control.
Jump to Post— stultuske 1,129to add a comment box itself, html will do.
as for handling the text, java, javascript, ...
there are lots of ways out there to get that done.
Jump to Post— epicrevolt 6If you want to get really simple, there are simple solutions that will do this for you. Solutions like http://www.htmlcommentbox.com/. That doesn't require any coding and is not very flexible, but if you don't want to learn a programming language, that should …
to add a comment box itself, html will do.
as for handling the text, java, javascript, ...
there are lots of ways out there to get that done.
ohkk...that means jsp will do my work then...thanks:)
If you want to get really simple, there are simple solutions that will do this for you. Solutions like http://www.htmlcommentbox.com/. That doesn't require any coding and is not very flexible, but if you don't want to learn a programming language, that should do well.
You will get script from disqus comments its best comments session box for blog or website.
If you want to place a comment box on your website, JSP will be more than enough keeping in mind that you've to store all of the comments for future use.
If you do not want an amazing one, Disqus is pretty good!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.