View Full Version : JS and MooTools: A PHP-like Include Function?

04-20-2009, 02:17 AM
I've come up against a problem:

I'm displaying a custom Google Map. The map JS is inside the standard MooTools
window.addEvent('domready', function() { ... }
I'd like to use some custom Google Maps libraries. Normally, I would just include them in the HEAD section with
<script type="text/javascript" src="http://cabazio.com/http://gmaps-utility-library.googlecode.com/svn/trunk/progressbarcontrol/1.0/src/progressbarcontrol.js"></script>

But of course this doesn't work if you need to call those functions in the library "progressbarcontrol.js" from within the MooTools window.addEvent.

So, is there a JS "include" function similar to the PHP include function, so I can "include" the "progressbarcontrol.js" library in the MooTools window.addEvent?

Essentially, I'm looking for a JS function that is like the PHP "include" function...