I need to load a variable number of javascript source files before running javascript code that depends on them. Sometimes 1 script needs to be loaded, other times 2. The ge
I suggest you look into LABjs
That is exactly what its purpose is.