Ways to add javascript files dynamically in a page
I have seen Scriptaculous.js file to include its required javascript files dynamically. Is there any better approach to include javascript dynamically. For example, I would like to include my js files like, <script src="single.js?files=first.js,second.js,third.js..."></script> How can I do that in an efficient manner? To load a .js or .css file dynamically, in a nutshell, it means using DOM methods to first create a swanky new "SCRIPT" or "LINK" element, assign it the appropriate attributes, and finally, use element.appendChild() to add the element to the desired location within the document