Using Jquery to dynamically load javascript results in continuous loading of the page
<p>i need to put javascript based on the user's geographical location. So i used jquery append menthod to load javascript. Its working fine but the page keeps on loading and has to be stopped from the browser... Can anybody help with that.</p>

<p>Following is the code</p>

<pre><code>&lt;script type="text/javascript"&gt;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://localhost/RahulProjects/JavaScriptTest.js';
$(document).ready(function(){
$("#myDiv").append(script);

});
</code></pre>

<p></p>

<p>Untitled Document</p>

<p>
 </p>

<p></p>





<p></p>

<p></p>

<p>i want the script to be appended inside the div. Following is the external js file content</p>

<pre><code>var Country = 'India';
document.write(Country);
</code></pre>

<p>it does display India though but the page keeps on loading and doesnt stop...
Thanks</p>
