Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
29
rated 0 times [  33] [ 4]  / answers: 1 / hits: 52354  / 11 Years ago, tue, may 14, 2013, 12:00:00

This question has already been asked here and here. But I have tried three of the answers with no good luck. I am using a system called Niagara which is acting as a web server, which may be the reason these techniques did not work. Nonetheless, I feel there must be a way to check for the existence of a file, not the existence of a 404 or 200 or 0.


More From » jquery

 Answers
10

You can use $.ajax



$.ajax({
url: 'example.com/abc.html', //or your url
success: function(data){
alert('exists');
},
error: function(data){
alert('does not exist');
},
})

[#78233] Monday, May 13, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
breonnamayah

Total Points: 574
Total Questions: 115
Total Answers: 96

Location: England
Member since Sun, May 21, 2023
1 Year ago
;