views:

83

answers:

3

I want an option like add comment in my forum to let the users post a quick reply.

Вован Путин -

+1  A: 

It works via HTTP.

Michael Borgwardt
You want to be careful making jokes at the expense of someone called "Putin"
David M
And why is this at +2 again?
Thomas Owens
-1. Smartass answers should go in the comments.
Matt Grande
-1 from my side also
rahul
Same as Matt Grande.
Clement Herreman
The answer is correct, adresses the question and is not meant to be sarcastic, but merely to make the OP think about what information he actually wants and perhaps indicate so in the comments.
Michael Borgwardt
How does that even remotely start to address the question? That is such a vague answer that it fits with almost anything. "How does StackOverflow.com work? It works via HTTP. How does my browser work? It works via HTTP. How does my cat get its food? It gets it via HTTP. How do post a smart-ass comment on your non-answer? I do it via HTTP." :)
Erich Mirabal
It's the *question* that's extremely vague and thus near impossible to answer usefully.
Michael Borgwardt
So why not just either not answer or ask them to clarify in a comment?
Erich Mirabal
Yes, the question is vague, but your answer is in no way helpful.
Matt Grande
+2  A: 

Add comment is done using AJAX.

From wikipedia

Ajax, sometimes written as AJAX (shorthand for asynchronous JavaScript and XML), is a group of interrelated web development techniques used on the client-side to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax has led to an increase in interactive animation on web pages[1][2] and better quality of Web services due to the asynchronous mode. Data is usually retrieved using the XMLHttpRequest object. Despite the name, the use of JavaScript and XML is not actually required, nor do the requests need to be asynchronous.[3]

rahul
+6  A: 

I think you mean the 'Add Comment' option.

It's some AJAX stuff. That's how it works basically :

  • Some lines of JavaScript calls a server-side page, giving it some arguments, like content of the comment, author, etc.
  • Server do some work, here it certainly adds some rows in the database, on the comments table..
  • Server give an answer to the client : in PHP everything that is echoed is
    returne to the client.
  • Client receive the answer, and manipulate the page, usually via the DOM, add the HTML that show the comment, refresh some stuff, etc.

See here for tutorial and overview of this technology.

Clement Herreman
best reply. thank you. great man!
No problem, that's SO's aim to be not Google ^^
Clement Herreman