SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Posts
    235
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Switiching between language

    please i want to know if there is a possibility to force the user to type english characters
    coz i made all my web site in arabic and germany languages

    i want to force user to type the username and password in english characters

    any ideas?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,840
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You can't use JavaScript to force anyone to do anything since not everyone has it on to start with and if you try to use it to force someone to do something they don't want to do they'll turn it off.

    You need to validate what they enter into your form once it gets to the server. You might repeat parts of that validation in JavaScript for the convenience of those filling out the form but no JavaScript validation of a form is enforceable and so all the validation you want to enforce must be done on the server.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •