SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: iPhone Keypad Selection
-
Oct 24, 2007, 17:41 #1
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 20:46.
"I haven't failed, I just found
100,000 ways that don't work"
— Thomas Edison
-
Nov 2, 2007, 22:41 #2
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
-
Nov 3, 2007, 01:34 #3
If you are doing stuff for the iphone then perhaps you should be a member here:
http://developer.apple.com/iphone/devcenter/
Bookmarks