title: How to replace element with ExtJs ajax responseText
body: <p>I'm trying to convert the jquery ajax to Extjs and eliminate the use for jquery library.</p>
  
  <p>But here's the problem...</p>
  
  <p>After loading the ajax response with Ext.Ajax.request the scripts from the ajaxed page don't get trigger.</p>
  
  <p>jQuery Ajax function:</p>
  
  <pre><code>        $(document).ready(function () {
          $.ajax({
              type: 'POST',
              url: '@Url.Content("~/Test/Header/")',
              success: function (response) {
                  $("#header").replaceWith(response);
              }
          });
      });
  </code></pre>
  
  <p>The code above works perfectly with the ajax content displaying properly and all the javascript get executed properly.</p>
  
  <p>Here's the Extjs version of the ajax request:</p>
  
  <pre><code>        Ext.onDocumentReady(function () {
          Ext.Ajax.request({
              method: 'POST',
              url: '@Url.Content("~/Test/Header/")',
              success: function (response) {
                  Ext.get('header').dom.outerHTML = response.responseText;
              }
          });
      });
  </code></pre>
  
  <p>The code above works fine in retrieving the response content, but when I replace the existing 'div' with the responseText, the javascripts from the response page doesn't get trigger.</p>
  
  <p>I suspect that this is because I'm not replacing the element correctly.</p>
  
  <p>So when I try using the jQuery version of the element replace, it works fine.</p>
  
  <p><strong>My question is, what's the proper way for Extjs to replace a 'div'?</strong></p>
  
  <p>I've tried a couple ways, and none of them works...</p>
  
  <p><strong>A better way to rephrase my question is... what is the Extjs equivalent of:</strong></p>
  
  <pre><code>$("#header").replaceWith(response);
  </code></pre>
  
  <p>Thanks</p>