I am posting this since most of the Regular Expressions I got from the NET where not working on
non-IE browsers..
function validate()
{
if (document.Form1.TextBox1.value!='')
{
var urlRegxp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
var url = document.Form1.TextBox1.value
if(urlRegxp.test(url) != true)
{
alert('Please enter a valid External URL');
document.Form1.TextBox1.focus();
return false;
}
}
}
Cheers
Rajesh Sivaraman.
Wednesday, August 30, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment