title: reload page with XMLHTTPREQUEST POST response
body: <p>i have an XMLHTTPREQUEST, and the request returns me a string with an HTML page that i want to charge on the page (the HTML contains Js and CSS) but i dont know how to do this. Here is my code:</p>
  
  <pre><code>xhr.onreadystatechange= function(){
        if (xhr.readyState ===4){
          if (xhr.status ===200){
              try{
                  var data = JSON.parse(xhr.responseText);
                  if(data.success){
                  //.......here i obtain the HTML with xhr.repsonse;
                  }else{
                      toastAlert(1,data.msg_response);
                  }
              }
              catch{
                  console.log("......")
              }
          }else{
              toastAlert(1,"......");
          }
        }
      };
  </code></pre>