[ka-Map-dev] [Bug 1299] dynamic js file loading

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Sat Feb 18 23:29:50 EST 2006


http://bugzilla.maptools.org/show_bug.cgi?id=1299





------- Additional Comments From pspencer at dmsolutions.ca  2006-02-18 23:29 -------
I have two thoughts on this:

1. have a php script that can load all the required javascript so you end up with one script tag that 
points to a single php script and it includes all the js files

2. have a load-on-demand method that appends <script> elements to the head ...

var s = document.createElement('script');
s.src = 'url';
document.getElementsByTagName('HEAD')[0].appendChild(s);

I think for now that option 1 would be simpler, especially if we move all the js into a single js directory 
and the php script could include all the js files in that directory.  Option 2 requires some additional 
thought ... MapBuilder has solved this problem through some sort of 'require("file")' call that various 
code can use to ensure other files have been loaded ...



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the ka-Map-dev mailing list