I've encountered a situation where I need JavaScript to check and see if a .mov file exists on the server, and subsequently enable/disable a link to the file.
Something like this:
if ("mypath/myclip.mov" exists) {
document.writeln("<a href='http://www.webdeveloper.com/forum/archive/index.php/mypath/myclip.mov'>Play Clip</a>");
} else {
document.writeln("No Clip Available");
}
My question is how do I determine if "mypath/myclip.mov" exists?
Something like this:
if ("mypath/myclip.mov" exists) {
document.writeln("<a href='http://www.webdeveloper.com/forum/archive/index.php/mypath/myclip.mov'>Play Clip</a>");
} else {
document.writeln("No Clip Available");
}
My question is how do I determine if "mypath/myclip.mov" exists?