filter special characters ( ascii > 127) in Change password

Discussion in 'Javascript' started by kike, Jul 20, 2004.

  1. kike

    kike Guest

    Hi.

    i have a change password form (plugin for squirrel mail) but when i
    use a special character like a "ñ" or "Ñ" i can't logon again.

    Well, an ugly solution is to filter that special characters.

    Anybody know how to do that=? Or a small tutorial to implement that?

    I do some code, but nothing happend.
    --*******************
    <script>
    function check_pass()
    {
    pass1=document.forms[0].elements["new_pw1"].value;
    pass2=document.forms[0].elements["new_pw2"].value;

    if (pass1.indexOf("ñ")!=-1 || pass2.indexOf("ñ")!=-1)
    alert("your code can't contain the ñ case");
    else
    document.forms[0].submit();
    }
    </script>
    ****************************


    thanks ignacio
     
    kike, Jul 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    576
    Pete Becker
    May 25, 2007
  2. Replies:
    1
    Views:
    520
    Lew Pitcher
    May 24, 2007
  3. AAaron123
    Replies:
    1
    Views:
    1,372
    Oriane
    Jan 16, 2009
  4. Dave Angel
    Replies:
    6
    Views:
    231
    Terry Reedy
    Nov 1, 2011
  5. Alextophi
    Replies:
    8
    Views:
    552
    Alan J. Flavell
    Dec 30, 2005
Loading...

Share This Page