|
Posted by Martin Jay on 05/17/06 04:18
In message <fa6dnfXtqdyC1ffZ4p2dnA@comcast.com>, Eric <nospam@email.com>
writes
>Is it possible to check for existence of a file from a web page using
>javascript? I am trying to come up with a routine that i can call from the
>rest of my javascript code that will check if a particular file exists on
>disk at the server. ie bool FileExists("http://myServer.com/File.gif");
>Any ideas on how to do this?
I cannot think of a way to achieve this.
You could, however, include a list of filenames in your Javascript, and
then simply check it to see whether a particular file exists.
There are some problems, though:
you may not wish to give visitors a list of all the files;
the list may be rather long;
and it might be a pain keeping the list up-to-date. :(
Does your host offer server side scripting, such as PHP or Perl? That's
probably the best solution.
--
Martin Jay
Navigation:
[Reply to this message]
|