|
<html>
<script type="text/javascript">
File = new Object();
File.Exist = function(fileToCheck) {
var tmp = new Image;
tmp.src = fileToCheck;
if (tmp.complete) {
return true;
}
else {
window.setTimeout('File.Exist(fileToCheck)', 5000);
return false;
}
}
</script>
<script type="text/javascript">
alert(File.Exist("http://muruganad.com/images/mypic1.jpg"));
</script>
</html>
create a new file file.exist copy and paste the above code. double click on it. U can see it works.
|