DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   web address validate in javascript (http://www.daniweb.com/forums/thread15023.html)

Deepa Dec 3rd, 2004 11:49 pm
web address validate in javascript
 
sample code to validate a web address using javascript
how to validate a web address enterredin a text box

tgreer Dec 10th, 2004 12:55 pm
Re: web address validate in javascript
 
I would use a Regular Expression:

function isURL(x)
{ return  REFindNoCase("^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\+~_]+[A-Za-z0-9\/]$",x) NEQ 0;
}


All times are GMT -4. The time now is 2:56 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC