RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4885 | Replies: 7
Reply
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

JavaScript -- Validating an email address

  #1  
Jul 10th, 2005
Is there a way to validate an email by checking it's existence?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: Arizona State University
Posts: 56
Reputation: bwest is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
bwest's Avatar
bwest bwest is offline Offline
Junior Poster in Training

Re: JavaScript -- Validating an email address

  #2  
Jul 11th, 2005
As far as I know there is no way to see if an email is a valid one. (otherwise spammers would be in heaven). But there is a technique used to make sure somebody is using a real email. I dont know what your application is but lets say somebody is signing up to be a member on your site, or any sort of application. You will probably need to give them information after they hit submit. (username, password, receipt info....) any of these things you could display on the "confirmation page" but why do that. If they are using a fake email for whatever reason, you'll never know. Just send them their username, password etc. to their email. This keeps them honest. They must check their email to do anything else, therefore it must be valid

By the way, a lot of these things have nothing to do with JavaScript
Reply With Quote  
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

Re: JavaScript -- Validating an email address

  #3  
Jul 11th, 2005
That's a great idea. Do you think java servlets or jsp would be the tool for the job if this really isn't for javascript? I know it would be a lot of server side stuff, right?
Reply With Quote  
Join Date: Jul 2005
Posts: 69
Reputation: bkendall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
bkendall's Avatar
bkendall bkendall is offline Offline
Junior Poster in Training

Re: JavaScript -- Validating an email address

  #4  
Jul 12th, 2005
I agree having a confirmation process would be a good idea. Alot of sites will have the user click on a link in thier email before they are "offically confirmed". you can use java script however to make sure the user enters a properly formatted Email address.

<script>
<!--

/*Email Check script credit-JavaScript Kit (www.javascriptkit.com) 200+ free JavaScripts here!
*/

function emailcheck(cur)
{
var string1=cur.email.value
if (string1.indexOf("@")==-1)
{
alert("Please input a valid email address!")
return false
}
}
//-->
</script>

<form onsubmit="return emailcheck(this)">
<strong>Enter your email address please:</strong><br><input type="text" size="20" name="email">
<input type="submit" value="Submit!">
</form>

<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
Reply With Quote  
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation: server_crash is on a distinguished road 
Rep Power: 9
Solved Threads: 18
server_crash's Avatar
server_crash server_crash is offline Offline
Postaholic

Re: JavaScript -- Validating an email address

  #5  
Jul 12th, 2005
Excellent! That really helped a lot because that was my next venture! Thanks.
Reply With Quote  
Join Date: Jul 2005
Posts: 5
Reputation: roza is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
roza roza is offline Offline
Newbie Poster

Please Help!!!!!!!!!!!!!!!!!

  #6  
Jul 20th, 2005
Hi,
I am not familiar with JavaScript very well, but despite the fact that where it says "enable" in "internet options" I checked the box, most of the sites still don't work. What could be the problem and how to fix it?
THANKS in advance,

-Roza
Reply With Quote  
Join Date: Jul 2004
Location: Arizona State University
Posts: 56
Reputation: bwest is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
bwest's Avatar
bwest bwest is offline Offline
Junior Poster in Training

Re: JavaScript -- Validating an email address

  #7  
Jul 26th, 2005
Im not sure what you mean. Where is enable, IE options? or in HTML? expalin a little more
Reply With Quote  
Join Date: Jul 2005
Posts: 5
Reputation: roza is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
roza roza is offline Offline
Newbie Poster

Re: JavaScript -- Validating an email address

  #8  
Jul 26th, 2005
IN internet options->security->custom->scripting-> ENABLE
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)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:29 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC