title: How to run AJAX loaded page scripts after loading
body: <p>I have a page like this that page1.php codes will load with ajax in that:</p>
  
  <pre><code>...
  &lt;div id="myContent" &gt;
  &lt;!-- ajax content load here --&gt;
  &lt;/div&gt;
  ...
  </code></pre>
  
  <p>and my ajax codes are:</p>
  
  <pre><code> $.ajax({
          type: 'post',
          url: 'codes/page.php',
          async: false,
          data: formDatas
          , success: function (response) {
              document.getElementById('myContent').innerHTML = response; // response contains page1.php codes
              }
          }
      });
  </code></pre>
  
  <p>and these datas will load from page1.php:</p>
  
  <pre><code>&lt;script&gt;
      alert("hello");
  &lt;/script&gt;
  
  &lt;div&gt;
      ...
  &lt;/div&gt;
  </code></pre>
  
  <p>Now my problem is that when I load page1.php directly, this alerts "hello". But when I load this contents via ajax , scripts not works and nothing alerted</p>
  
  <p>How do I do to running these scripts after loading datas in <strong>myContent</strong> div.</p>
  
  <p><strong>thank you all</strong></p>