|
From: Robert R. <rra...@ya...> - 2001-01-03 20:18:32
|
I've updated my current version to do this for a while, but just haven't =
put
it in CVS. I will update CVS soon so that the include will work that way.
Robert
----- Original Message -----
From: "Michael B=FCrge" <mb...@st...>
To: <dyn...@li...>
Sent: Tuesday, January 02, 2001 6:58 PM
Subject: [Dynapi-Dev] DynAPI.include()
> 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 star=
ted
dealing with
> the dynapi after having spent a _lot_ of time putting together somethin=
g
similar on my own (i now finally gave up, mainly because it's just way to=
o
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. lookin=
g
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 th=
e
current CVS-version do not contain them.
> so here's my version:
>
> include : function(src,path) {
> if(src.substring(src.length-3)!=3D".js") src+=3D".js";
> if (!path) var path=3DDynAPI.librarypath;
> else {
> if (path=3D=3D"./") path =3D "";
> else if (path[path.length-1] !=3D "/") path +=3D "/";
> document.write('<script language=3D"Javascript1.2" src=3D"'+ path=
+ src
+ '"></script>');
> return;
> }
> ....some more stuff....
> }
>
> hope this is usefull, and sorry if i missed the version containing thos=
e
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
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
|