Use XML like below. This is a function I found some time ago and does work good. It was actually a vb function but I think it should work now for vbscript......
<%
Function val_url(UrlName)
Dim objHTTP, sHTML
On Error Resume Next
val_url = false
if UrlName <> "" Then
if left(lcase(UrlName),7)<>"http://" Then
UrlName="http://" & UrlName
End if
Set objHTTP = Server.CreateObject ("Microsoft.XMLHTTP")
objHTTP.open "HEAD", UrlName, False
objHTTP.send
sHTML=objHTTP.statusText
if err or sHTML<>"OK" Then
val_url=false
else
val_url=true
End if
Set objHTTP=nothing
End if
End Function
Dim vStrUrl
vStrUrl=request.form("hiddenfield") & request.form("textfield")
if vStrUrl <> "" then
if val_url(vStrUrl) then
Response.write"<br><br>A Valid URL" 'submit your form here
else
Response.write"<br><br>NOT a Valid URL" 'spit out whatever error you have
end if
end if
%>
Edited by michael