954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

web address validate in javascript

sample code to validate a web address using javascript
how to validate a web address enterredin a text box

Deepa
Newbie Poster
19 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

I would use a Regular Expression:

function isURL(x)
{ return   REFindNoCase("^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\+~_]+[A-Za-z0-9\/]$",x) NEQ 0;
}
tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You