|Subject:||Re: Accessing a variable in another file & file ops.|
|Posted by:||Laurent Bugnion, GalaSoft (galasoft-…@bluewin_NO_SPAM.ch)|
|Date:||Sun, 13 Jul 2003|
> Two newbie questions:
> inside a function. I have tried many combinations to do this, but has
> yet to try the right one. How is it done?
You must include your other JS file with
After that, all the variables defined in the other file are available to
the script. All files and partial scripts are loaded in the page, so
that it becomes, in the end, one whole. This can cause problems,
however, especially if 2 global variables have the same name.
> read, write)? As far as I know all file operations are possible using
> only? (I'm talking file operations on my own files on my ISP's
many possible configurations that it's impossible to detail all of them.
If you're talking about client-side operations on server-side files,
your possibilities are almost zero. All files operations should be
realized on the server, where you can very well use server-side
files in a directory on the server it originates from (if the server
allows directory browsing) and also read a file (text or binary).
ActiveX (on IE only) to perform local file operations (list, write,
read...). In Netscape, local file operations can be performed using Java
File objects, once again in a relaxed security environment. But it's not
what you need and I mention it only for memory.
Detail exactly what you're trying to do, and I'll tell you if it's possible.
Accessing a variable in another file & file ops. posted by ptrl…@hotmail.com (Peter) on 12 Jul 2003