# Hold while JS loads

**URL:** https://forum.kirupa.com/t/hold-while-js-loads/305122
**Category:** web dev
**Created:** [February 19, 2010, 12:49pm UTC](https://forum.kirupa.com/t/hold-while-js-loads/305122 "2010-02-19T12:49:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gkp\_gaurav1](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@gkp\_gaurav1](https://forum.kirupa.com/u/gkp_gaurav1)
#### Post date: [February 19, 2010, 12:49pm UTC](https://forum.kirupa.com/t/hold-while-js-loads/305122/1 "2010-02-19T12:49:21Z")

</div>

Hello,  
I am calling a JS file within another JS file with document.write("\<script type=‘text/javascript’ src=’…’\>\</script\>");

after that some functions are written over there again with document.write. The problem is The script executes all the codes without waiting for inner JS loading. Is there any way to hold before the inner JS is fully loaded?
