testing for existence of file

E

Eric

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?
Thanks
Eric
 
R

Randy Webb

Eric said the following on 5/16/2006 6:18 PM:
Is it possible to check for existence of a file from a web page using
javascript?

Is it possible that you didn't search the archives before asking?

<URL:
http://groups.google.com/group/comp...ang.javascript&q=verify+file+on+server&qt_g=1
Search phrase: verify file on server
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?

See above.
 
E

Eric

Randy said:
Eric said the following on 5/16/2006 6:18 PM:

Is it possible that you didn't search the archives before asking?

<URL:
http://groups.google.com/group/comp...ang.javascript&q=verify+file+on+server&qt_g=1

Search phrase: verify file on server


See above.

Let me ask you, have you looked at the results of that? I doubt it.
I'd urge you to can the attitude, its becoming way too prevalent on usenet
and serves no purpose. If you find my question offensive, dont respond -
simple aint it.
 
R

Randy Webb

Eric said the following on 5/16/2006 7:21 PM:

Let me ask you, have you looked at the results of that? I doubt it.

You guessed wrong. Although a better phrase to search on would be
"verify file exists" which leads to this thread:

<URL:
http://groups.google.com/group/comp...?q=verify+file+exists&rnum=7#d3eb36618d15eece
I'd urge you to can the attitude, its becoming way too prevalent on usenet
and serves no purpose. If you find my question offensive, dont respond -
simple aint it.

Get over yourself. This is Usenet, not your help desk. You ask a
question, it gets discussed. You get an answer - Great. You don't, you
get over it and move on.

But, view the above thread.
 
T

Thomas 'PointedEars' Lahn

Eric said:
http://groups.google.com/group/comp...ang.javascript&q=verify+file+on+server&qt_g=1

Let me ask you, have you looked at the results of that? I doubt it.

Doubt as much as you want, I do get 87 hits where many are useful to solve
that problem. It is just that you did not care to investigate, or are
unable to comprehend what was posted due to a lack of minimum clue (which
can be fixed by minimum research, though).
I'd urge you to can the attitude, its becoming way too prevalent on usenet
and serves no purpose. If you find my question offensive, dont respond -
simple aint it.

Why is it that the attitude persists that one may post any junk because
nobody has to read it? Everybody pays for the bandwidth you are wasting
with this, one way or another.

That comment usually serves the good purpose of wasting not _more_ time on
individuals with an antisocial attitude. People who violate the standards
that created this very medium, by forging headers in order to avoid spam,
burdening the problems caused by their incompetence and laziness on others.
People who post FAQs again and again, who do not search the archives first.
People who lack the simple courtesy of posting with at least their full
real name, Eric #47110815. It should teach you (and others with the same
attitude) how to get better responses in the future by changing _your_
attitude, instead of simply ignoring you (and thereby not helping you at
all).

This also supports the need of having more time for more interesting people
with more interesting questions, let alone for one's own projects. It can
be argued that such a comment now and then supports this purpose even more
than just ignoring floods of inappropriate postings coming in here.

This is Usenet, not a support forum where you get to read what you want to
read. If you can't stand the heat, get out of the kitchen -- deal with it
or go away. There is a good Usenet tutorial in the KNode online help, BTW.


F'up2 PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top