That would also avoid the problem. Until the line where `create.js` is called, the needed function would have already been loaded. So yes, it would also work. However especially when you're making DOM changes, it's a must to have your scripts either after "document completed" sort of event catchers, or after your whole body content, before the tag is closed.
– ASertacAkkayaFeb 07 '13 at 00:37
1
Yes, this is how add-in libraries like jQuery work. You include their .js file, and then call its methods.
Thanks. But in this case, it is different because I want to refer a function in create.js where the function show() is defined below.
– tongaFeb 06 '13 at 20:46
1
There tends to be more of an issue when javascript inadvertently references an HTML element that does not yet exist on the page. You might find [this excellent question and its answers](http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page) helpful.
– DOKFeb 06 '13 at 20:53