jQuery - script tags in the HTML are parsed out by jQuery and not executed
<p>I have an HTML page like so:</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
&lt;div id='something'&gt;
    ...
    &lt;script&gt;
    var x = 'hello world';
    &lt;/script&gt;
    ...
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>On another page, I am doing this:</p>

<pre><code>$.ajax({
    url: 'example.html',
    type: 'GET',
    success: function(data) {
        $('#mydiv').html($(data).find('#something').html());
        alert(x);
    }
});
</code></pre>

<p>jQuery, however, is not executing the javascript in the first file, even though the documentation says it does. How can I make it do that?</p>

<p>EDIT: Unfortunately in the real world application I am working on I don't have control over what the "included" page has. We are on the same domain, but I can't modify the code that it outputs as it is a packaged product our IT department will not let us modify.</p>
