SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    ********* Scotland Saltire's Avatar
    Join Date
    Jan 2000
    Location
    Scotland
    Posts
    660
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Check if user has entered a hotmail email address

    Hi,

    I am trying to find a script to check the what a user has entered into the text field, when they are trying to sign up to a mailing list, to see if they have entered a msn yahoo or hotmail email address, and if so, pop up a box explaining that due to hotmail's junk filter canning most legit emails from mailing lists, to make sure they add the email address the mailing is sent from their list of 'allowed' addresses to make sure they receive it.

    Thanks in advanced.

  2. #2
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    depends on your knowledge of Javascript ...

    you can check the indexOt("msn.com") and the indexOf("yahoo.com") and indexOf("hotmail.com") and if any of them come back with anything but -1 you know you have one of them.... thats the rudamentary way .......

    if you know what your doing with js you can build some regular expressions to test the fields value..

  3. #3
    ********* Scotland Saltire's Avatar
    Join Date
    Jan 2000
    Location
    Scotland
    Posts
    660
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, got the basics there.. what im looking for is really a premade script..

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahhh...in other words, you want someone to write the script for you for free? This forum is for helping people learn javascript--it's not a clearing house for free web design services. Tell your friends.

  5. #5
    ********* Scotland Saltire's Avatar
    Join Date
    Jan 2000
    Location
    Scotland
    Posts
    660
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, I'm trying to find a script that already does that.

  6. #6
    SitePoint Evangelist SpaceFrog's Avatar
    Join Date
    Jan 2005
    Location
    Outerspace
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello compatriot !

    try this link

  7. #7
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <script>
    bad_sites = "yahoo.com|hotmail.com|msn.com";
    </script>
    <input 
        onchange="if(value.match(new RegExp('(' + bad_sites + ')$')))alert('Bad email!')">

  8. #8
    ********* Scotland Saltire's Avatar
    Join Date
    Jan 2000
    Location
    Scotland
    Posts
    660
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That worked perfectly. Many thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •