title: Refresh a div with ajax response
body: <p>So i have a comments box with a form (textbox and submit). This gets validated and then sent to the php page via ajax.</p>
  
  <p>If all okay, the response is set and the page continues.</p>
  
  <p>I want however the div to refresh itself so that you can see the new comment.</p>
  
  <p>I dont want anything complicated like appending etc just simply to reload the div (data is pulled from database).</p>
  
  <p>I have used this in the past but it doesnt work:</p>
  
  <pre><code> $('#divid').load('page.php #divid'),
  </code></pre>
  
  <p>any idea how i can convert this:</p>
  
  <pre><code>        if (check == true) {
          $.ajax({
          type: "POST",
          url: "process/addcomment.php",
          data: $targetForm.serialize(),
          dataType: "json",
          success: function(response){
  
      if (response.databaseSuccess)
         $comment.after('&lt;div class="error"&gt;Comment Added&lt;/div&gt;');
      else
         $ckEditor.after('&lt;div class="error"&gt;Something went wrong!&lt;/div&gt;');
  
  }
          });
      }
      return false;
  });
  </code></pre>
  
  <p>});</p>
  
  <p>To refresh the div once the success gets responded?</p>
  
  <p>if i try to add another $return to my php e.g</p>
  
  <pre><code>} catch (Exception $e) {
  $return['databaseException'] = $e-&gt;getMessage();
  }
  
  $return['databaseSuccess'] = $dbSuccess;
  $return['responseHtml'] = 'Post Updated';
  
  echo json_encode($return);
  </code></pre>
  
  <p>the javascript doesnt work and i just get the php page load with the returns printed..</p>
  
  <p>Thanks.</p>