How to upgrade a unit after you added the record in database, ajax?

Write comments, want to update the comment block, after the added comments by users.
$(document).ready(function (){
 $("#comment").submit(function (e){
 var url = $(this).attr('action');
 //var data = new FormData($('#update')[0]);
 var data = $('#comment').serialize();
 }).done(function (data){

Now just displays error or success #response.
public function save_comment(){
 //$this->form_validation->set_error_delimiters("<span class="error">", "</span>");
 $this->form_validation->set_rules('comment', 'Comment', 'required');
 $this->form_validation->set_rules('series_id', ", 'numeric');
 if($this->form_validation->run() === FALSE){
 /*return false;*/
 echo "
 <div class="alert alert-block alert-error fade in">
 <a class="close" data-dismiss="alert">×</a>
 <h4 class="alert-heading">
 } else {

July 9th 19 at 13:25
1 answer
July 9th 19 at 13:27
Well, the unit should be loaded from the database, or just when you reload the page, or Aaham, though why AJAX, this is not a chat.

Find more questions by tags AJAXCodeIgniterMySQLPHP