title: Uncaught TypeError: Cannot read property 'appendChild' of undefined after Ajax call
body: <p>I wanted to replace my html with the new Ajax response html but this error shows in the console and my script files are not loading correctly. Apparently this error comes in the file "jquery-1.10.1.min.js". Following is my ajax code which I used to replace with the html in the success function.</p>
  
  <pre><code>$(function() {
           $('#addcustomer-done').click(function() {
  
         var formData = new FormData($('#submit_form')[0]);
  
         //---------------------- AJAX CALL 1 -----------------------------------------//
         $.ajax({
              // headers : {
                        // 'X-CSRF-Token' : document.getElementsByName('csrfmiddlewaretoken')[0].value
                    // },
              url : "/savecustomer/",
              type : "POST",
  
               data:formData,
               contentType: false,
               cache: false,
               processData: false,
               async: false,
  
               cache:false,
               contentType: false,
               processData: false,
  
  
              success : function(data) {
                  alert(data);
  
                  $("html").html("");
                  $("html").html(data);
              }
  </code></pre>
  
  <p>I'm a beginner at ajax. Kindly guide me how to get rid of this error. Thanks in advance.</p>