944,201 Members | Top Members by Rank

Ad:
Dec 4th, 2004
0

web address validate in javascript

Expand Post »
sample code to validate a web address using javascript
how to validate a web address enterredin a text box
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Deepa is offline Offline
19 posts
since Nov 2004
Dec 10th, 2004
0

Re: web address validate in javascript

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. }
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Could I Link My Statcounter Javascript to another page?
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Java Balloon?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC