View Single Post
Old 07-23-2011, 10:59 AM   PM User | #5
bullant
Banned

 
Join Date: Feb 2011
Posts: 2,699
Thanks: 13
Thanked 395 Times in 395 Posts
bullant is on a distinguished road
Quote:
Originally Posted by Old Pedant View Post
I wonder if you couldn't use an AJAX call to try to download the contents of the script? .
Not if it's on a different domain.

If it's on the same domain you could send a head request to see if the url exists.

A simplified example
Code:
 
           var url='http://www.yourdomain.com';
            xmlHttp = new XMLHttpRequest();
            xmlHttp.open('HEAD', url, false);
            xmlHttp.send();
            alert(xmlHttp.status);
bullant is offline   Reply With Quote
Users who have thanked bullant for this post:
webdev1958 (08-13-2011)