Hummm, no replies yet.....
Will this work? I found code on the web and modified it only a little:
HTML Code:
function testExists(strFile) {
var objAJAX = null;
if(window.ActiveXObject) {
try {
objAJAX = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
objAJAX = new ActiveXObject("Microsoft.XMLHTTP");
} catch(E) {
objAJAX = false;
}
}
} else if(typeof XMLHttpRequest != "undefined") {
objAJAX = new XMLHttpRequest();
}
if(objAJAX) {
objAJAX.open("GET", strFile, true);
objAJAX.onreadystatechange = function() {
if (objAJAX.readyState == 4 && objAJAX.status == 200) {
return "false"; // file exists //
else
return "true"; // file doesn't exist //
}
}
return "true"; // can't define Ajax object - don't chance it //
}
}
and that gets called here:
HTML Code:
(snip)
/// Correct imageurl array for any missing elements //
for (m=3;m<=imagetotl-1;m++) {
while (testExist(imageurl[m] && m<=imagetotl-1) {
for (o=m;o<=imagetotl-1;o++){ // shift array //
imageurl[o]=imageurl[o+1];
imagetotl--;
}
}
}
(snip)
I just need to make sure that I define the imageurl array one larger than I need to hold the urls.
Bookmarks