So how would I do that?
[/QUOTE]
I found this at our very own FAQ for this group. Go figure.
[quote src='[URL]http://jibbering.com/2002/4/httprequest.html[/URL]']
Does a url exist?
Another simple use is finding if a url exists, in HTTP there are various
status codes returned by both HEAD and GET requests, 200 means success, 404
means failure, and the others mean other things. See HTTP status codes for a
full explanation. using the status property of the xmlhttp object provides
you this status
xmlhttp.open("HEAD", "/faq/index.html",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
if (xmlhttp.status==200) alert("URL Exists!")
else if (xmlhttp.status==404) alert("URL doesn't exist!")
else alert("Status is "+xmlhttp.status)
}
}
xmlhttp.send(null)
[/quote]
Obviously, this is only supported by more recent browsers.
--