title: Dynamically submit form and show the value of the input without reloading
body: <p>I want to create a fully dynamic chat UI  for my website,
  But it reloads the whole page if a person submits the button this will directly show the div</p>
  
  <pre><code>&lt;div class="messeging" id="msg"&gt;
      &lt;?php  print $message-&gt;getName() ." : " . $chat-&gt;message . ""; ?&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Without reload msgs are save in some xml file path like example <code>(../user/xml)</code>
  HTML</p>
  
  <pre><code>&lt;form action="action.php" method="post"&gt;
      &lt;input type="text" id="input" value="php echo"&gt;
      &lt;input type="submit" value="send" onclick="showDiv()"&gt;
  &lt;/form&gt;
  
  &lt;div class="messeging" id="msg"&gt;
      &lt;?php  print $message-&gt;getName() ." : " . $chat-&gt;message . ""; ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><em>i don't know javascript/ajax well how to solve this</em></p>