Request source code from internal page using jquery same domain
<p>I'm trying to get the source of an internal domain page can have it basically cloned into a js file.</p>

<p>I'm not sure if it's possible, but I have attempted to start what the code might look like.</p>

<p>I realize the var source is probably where I go wrong as that will not function correctly.</p>

<p>Hopefully someone can try to debug my code.</p>

<p>Thanks!</p>

<pre><code>   $(document).ready(function() {
      // make request to site
    var request = "http://mysite.com/page.html";
      // get the dom from the html layer
    var source = $(request+'html').html();
      // output to the dom the source of the request
    $('html').append(source);
    });
</code></pre>

<p>Would something like this make more sense?</p>

<pre><code>$(document).ready(function() {
var create = $('html').load('http://mysite.com/page.html');
document.write(create);
});
</code></pre>
