web address validate in javascript

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Nov 2004
Posts: 19
Reputation: Deepa is an unknown quantity at this point 
Solved Threads: 0
Deepa Deepa is offline Offline
Newbie Poster

web address validate in javascript

 
0
  #1
Dec 4th, 2004
sample code to validate a web address using javascript
how to validate a web address enterredin a text box
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: web address validate in javascript

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

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function isURL(x)
  2. { return REFindNoCase("^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\+~_]+[A-Za-z0-9\/]$",x) NEQ 0;
  3. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC