User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 329,254 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,321 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 131419 | Replies: 1
Reply
Join Date: Nov 2004
Posts: 19
Reputation: Deepa is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Deepa Deepa is offline Offline
Newbie Poster

web address validate in javascript

  #1  
Dec 3rd, 2004
sample code to validate a web address using javascript
how to validate a web address enterredin a text box
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,589
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 33
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: web address validate in javascript

  #2  
Dec 10th, 2004
I would use a Regular Expression:

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

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC