I'm confused as to how I could seperate out the functionality of a plugin I am writing into multiple javascript files in the plugin directory. Can anyone help me? I have tried some document.write stuff but haven't had any luck yet. Thanks in advance
Thu, 01/22/2009 - 10:40
#1
Re: Multiple javascript file plugin
Here is how you can include some extra js files in the plugin. Its the standard javascript 'include' mechanism - I DID try it before HONEST! (must have screwed up the path)
Anyway for my purposes this is not perfect because it would be nice to have the 'included' code processed before the code following in the file - which of course it isn't as the javascript tag is written to the document. If there is anyway to do this, like via ScriptLoader or something, hopefully someone will post it below.
Re: Multiple javascript file plugin
But to wait with proceeding until the script is loaded, you'll have to check on, for example, a variable that is created in the included script in a iterating timeout...