|
 |
asp_web_howto thread: web site address validation
Message #1 by "Thomas Clark" <hoonboon69@h...> on Thu, 19 Apr 2001 15:09:08
|
|
Hello,
I'm looking for some advice on which way to approach the following...I need
to validate that a user's entry on a form is a web site address,
ie..www.p2p.wrox.com. I know that you can use the javascript indexOf() to
find the "@" when validating an e-mail address, but what would I look for
in regards to a web address? Left(document.form.webaddress.value, 3) and
check for the www? Any input would be greatly appreciated. Thanks.
Tom
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 19 Apr 2001 17:31:23 +0100
|
|
not all web addresses have www
e.g. http://p2p.wrox.com
The only thing I can suggest is to get a full list of domains
(.com,.net,.co.uk etc) and check the string ends with one
-----Original Message-----
From: Thomas Clark [mailto:hoonboon69@h...]
Sent: Thursday, April 19, 2001 4:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] web site address validation
Hello,
I'm looking for some advice on which way to approach the following...I need
to validate that a user's entry on a form is a web site address,
ie..www.p2p.wrox.com. I know that you can use the javascript indexOf() to
find the "@" when validating an e-mail address, but what would I look for
in regards to a web address? Left(document.form.webaddress.value, 3) and
check for the www? Any input would be greatly appreciated. Thanks.
Tom
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
|
|
 |