944,161 Members | Top Members by Rank

Ad:
Jul 10th, 2005
0

JavaScript -- Validating an email address

Expand Post »
Is there a way to validate an email by checking it's existence?
Similar Threads
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jul 11th, 2005
0

Re: JavaScript -- Validating an email address

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
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
bwest is offline Offline
57 posts
since Jul 2004
Jul 11th, 2005
0

Re: JavaScript -- Validating an email address

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?
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jul 12th, 2005
0

Re: JavaScript -- Validating an email address

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.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script>
  2. <!--
  3.  
  4. /*Email Check script credit-JavaScript Kit (www.javascriptkit.com) 200+ free JavaScripts here!
  5. */
  6.  
  7. function emailcheck(cur)
  8. {
  9. var string1=cur.email.value
  10. if (string1.indexOf("@")==-1)
  11. {
  12. alert("Please input a valid email address!")
  13. return false
  14. }
  15. }
  16. //-->
  17. </script>
  18.  
  19. <form onsubmit="return emailcheck(this)">
  20. <strong>Enter your email address please:</strong><br><input type="text" size="20" name="email">
  21. <input type="submit" value="Submit!">
  22. </form>
  23.  
  24. <p align="center"><font face="arial" size="-2">This free script provided by</font><br>
  25. <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
  26. Kit</a></font></p>
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
bkendall is offline Offline
69 posts
since Jul 2005
Jul 12th, 2005
0

Re: JavaScript -- Validating an email address

Excellent! That really helped a lot because that was my next venture! Thanks.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jul 20th, 2005
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
roza is offline Offline
5 posts
since Jul 2005
Jul 26th, 2005
0

Re: JavaScript -- Validating an email address

Im not sure what you mean. Where is enable, IE options? or in HTML? expalin a little more
Reputation Points: 14
Solved Threads: 1
Junior Poster in Training
bwest is offline Offline
57 posts
since Jul 2004
Jul 26th, 2005
0

Re: JavaScript -- Validating an email address

IN internet options->security->custom->scripting-> ENABLE
Reputation Points: 10
Solved Threads: 0
Newbie Poster
roza is offline Offline
5 posts
since Jul 2005

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: open link in opening window
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: javascript to add select button





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


Follow us on Twitter


© 2011 DaniWeb® LLC