You can, like this: document.body.insert(new Element("script", { type: 'text/javascript', src:'test.js' }))
The fun part is writing a wrapper for all the functions contained in that script so that they load the script and execute, rather than fail. On Oct 15, 7:16 am, "jason maina" <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to load script files only when they are needed. > In the application im currently making there are too many script(js) files > loaded on the parent page yet in the entire life-cycle of the application > usage some tabs will not even be clicked hence the idea to only load script > files when needed. > > Thank you in advance. > > - Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---