SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast sffc's Avatar
    Join Date
    Jul 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow iPhone Keypad Selection

    In an iPhone, when a user clicks on a textfield, the letter-keypad appears. However, for a web application I am creating, all of the text fields will accept only numbers. Is there a value you can set to a certain <input> textfield (perhaps through javascript?) that will open the numeric keypad on iPhones rather than the alphabetic one?
    Last edited by sffc; Oct 28, 2007 at 19:46.
    "I haven't failed, I just found
    100,000 ways that don't work"
    Thomas Edison

  2. #2
    SitePoint Enthusiast sffc's Avatar
    Join Date
    Jul 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found a way! If you set the "name" property of the text field to "phone" or something similar, it will make the iPhone think that it is a phone number, thus displaying a numerical keypad. You may have to change some server-side scripts to accommodate the change, but it will make the web page much more user-friendly.

    HTML Code:
    <input type="text" name="phone" class="textf1" value="0" etc />
    "I haven't failed, I just found
    100,000 ways that don't work"
    Thomas Edison

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    If you are doing stuff for the iphone then perhaps you should be a member here:
    http://developer.apple.com/iphone/devcenter/
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



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
  •