umerjafer
06-13-2008, 08:38 PM
Hi all,
My company's website has a js script implemented on all its pages for a specific task. This script sometimes slows down loading of the page for some users so
I wanted to load that file after the complete page is loaded so that the visitor on the site does not feel any problem. I found one solution which is working perfectly with firefox but it is causing "Operation Aborted" error with IE. Here is the code:
<script type="text/javascript">
var body= document.getElementsByTagName('body')[0];
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= 'Myfile.js';
body.appendChild(script);
</script>
if anyone could tell me the reason of error in IE then that would be great. Thanks in advance.
My company's website has a js script implemented on all its pages for a specific task. This script sometimes slows down loading of the page for some users so
I wanted to load that file after the complete page is loaded so that the visitor on the site does not feel any problem. I found one solution which is working perfectly with firefox but it is causing "Operation Aborted" error with IE. Here is the code:
<script type="text/javascript">
var body= document.getElementsByTagName('body')[0];
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= 'Myfile.js';
body.appendChild(script);
</script>
if anyone could tell me the reason of error in IE then that would be great. Thanks in advance.