473,387 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to force numeric keypad from an input box (HTML)

yarbrough40
320 100+
I built a web-based application (HTML) optimized for mobile devices. Is there any way to force the numeric pad to come up when clicking an input box (as opposed to the qwerty default)?
Jun 2 '11 #1

✓ answered by markmcgookin

This is difficult because a "numeric keypad" is a device specific thing.... There may be a way to mask the box so that it can only accept numbers, mobile OSs might be able to pick this up and only show a numeric keypad, but you'll need to refer to each OSs specific documentation to find out if this is possible and what the triggers for such a response would be.

5 10896
markmcgookin
648 Expert 512MB
This is difficult because a "numeric keypad" is a device specific thing.... There may be a way to mask the box so that it can only accept numbers, mobile OSs might be able to pick this up and only show a numeric keypad, but you'll need to refer to each OSs specific documentation to find out if this is possible and what the triggers for such a response would be.
Oct 4 '11 #2
yarbrough40
320 100+
Thanks, yeah I figured this was the case.
Oct 4 '11 #3
there is a solution for your problem.
Use this in your css and your mobile input will be forced to give only number keypad means only numbers will be entered.
<input type="text" style="-wap-input-format: 'N'"/>
Dec 31 '11 #4
yarbrough40
320 100+
Nice! Thanks..... I'll give it a try
Jan 2 '12 #5
Or the new HTML5 input types:

Expand|Select|Wrap|Line Numbers
  1. <input type="tel">
  2. <input type="number">
Will bring up the appropriate keypad if the mobile browser supports it. If not, then it is treated like a text field for backwards compatibility.

More: http://www.456bereastreet.com/archiv...5_input_types/
Jan 14 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Melson | last post by:
Hi Does anyone know how to configure the numeric keypad on the keyboard. For example, by pressing button 7, it displays a character. I must also be able to display number 7 whenever I pressed...
3
by: Melson | last post by:
Hi May I know is there a way to change the Numeric keypad into mobile phone keypad? Regards Melson
1
by: frasmus | last post by:
*Please excuse me for cross-posting. I really can't find a suitable "wireless internet" group to ask this question, except forum.nokia, where I didn't have any luck. I have a web page for...
4
by: Dennieku | last post by:
Hi, I have to develop an on-screen keyboard and on-screen numeric keypad for a touchscreen UI. The hardest thing with this is that it has to be multi-lingual. Has anybody have ideas how to...
24
by: Gary Hasler | last post by:
I want apache to parse all .html files for php code. Our 'real' web server is rented from ICDsoft ( php 5 on Apache on Linux whatever), and their instruction is to add the following to the...
4
by: Steve Swift | last post by:
I have a page that accepts user input, including HTML. I would like to offer a preview of what the users HTML will look like, but I'd also like to avoid having to parse their HTML to ensure that it...
10
by: gopishk | last post by:
I have a text box and it can contain only numbers. Similar to a phone number text box while adding a new contact. Programatically how can we open only the numeric keypad instead of both text/numeric...
0
by: mcfly1204 | last post by:
I am looking build an onscreen keyboard similar to the onscreen keyboard included in Windows 7, except I only want the numeric keypad portion. I created a C# form with buttons laid out to mimic a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.