Cyprus Property - Human body - Turquoise Jewelry - VeraciTek, Inc. - We Build Websites - Debt Consolidation

PDA

View Full Version : Javascript validation for URL


technoguy
Feb 12th 2007, 9:15 am
I want to validate textbox using java script for URL.

Any help will be appreciated. Thank you

nico_swd
Feb 12th 2007, 9:26 am
function is_valid_url(url)
{
return url.match(/^(ht|f)tps?:\/\/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\\|\\\^\[\]`]+)?$/);
}




This should do it.