function isURL(argvalue)
{
urlRegEx = /http[s]?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?/;
var testVal = argvalue.trim();
if(testVal.length > 9 && urlRegEx.test(testVal))
{
return true;
}
else
{
return false;
}
}
Usage
if(!isURL(document.getElementById(FinalControlID2).value))
Monday, June 2, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment