I don't know what limit might be placed on such a thing ... but I built (
can't find my example at the moment) a little function that creates a new javascript include element in the page header, effectively loading javascript on the fly (
I used it for proof of concept loading php values as javascript without ajax)...
Try using the javascript DOM to write and append a
<script> tag to the page header, and you should get the new javascript loaded dynamically in the page.
parent script
function load_script ( path ) {
var head = document.getElementsByTagName('head').item(0);
var script = document.createElement('script');
script.setAttribute( 'type', 'text/javascript' );
script.setAttribute( 'src', path );
head.appendChild( script );
}
load_script( 'test.js' );
child script (test.js)
Didn't test this, but something like this is how I made it work before.
Cheers
...