|
From: Michael <mb...@st...> - 2001-01-02 23:55:42
|
hi there.
this is my first post to this list, and i would like to use the opportunity to thank you for the great work you're all doing. i just started dealing with
the dynapi after having spent a _lot_ of time putting together something similar on my own (i now finally gave up, mainly because it's just way too much
work keeping everything up to date).
now to the real issue of this post:
the following is an excerpt from part 1 one of the tutorials written by Pascal, describing the include() function:
* DynAPI.include('myownfile.js','location/path')
Include your own file not located in the [dynapi base path] location
* DynAPI.include('myownfile.js','./')
Include your own file located at the current file location.
i like these features, so i tried to use them bu it didn't work. looking at the code i realised that they weren't implemented at all. i don't know if
somebody did already implement them, but both the current distro and the current CVS-version do not contain them.
so here's my version:
include : function(src,path) {
if(src.substring(src.length-3)!=".js") src+=".js";
if (!path) var path=DynAPI.librarypath;
else {
if (path=="./") path = "";
else if (path[path.length-1] != "/") path += "/";
document.write('<script language="Javascript1.2" src="'+ path + src + '"></script>');
return;
}
....some more stuff....
}
hope this is usefull, and sorry if i missed the version containing those features. (BTW: is was pretty hard for me to find out where to get the current
files, so a few hints on the project-webpage would save a great deal of time to people interested in looking at the current work going on)
that all for now.
greets.
michael buerge
|