473,589 Members | 2,498 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

320 Contributor
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
5 10905
648 Recognized Expert Contributor
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
320 Contributor
Thanks, yeah I figured this was the case.
Oct 4 '11 #3
1 New Member
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
320 Contributor
Nice! Thanks..... I'll give it a try
Jan 2 '12 #5
8 New Member
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

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 the 7 button (probably with Ctrl button). Should I create a windows service or just an application? Pls help. Thanks.
by: Melson | last post by:
Hi May I know is there a way to change the Numeric keypad into mobile phone keypad? Regards Melson
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 inputting personal expenses into a financial database with a cell phone. To force numeric values on the keypad, I used <input name="num" width="70" height="20" format="*NNNN/" type="Currency" align="right"> The page works just great with the free...
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 handle the strange characters of some languages and how to handle the different number of characters in the alphabet of some languages? I've already started with the numeric keypad and I've changed the culture to
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 .htaccess file: AddHandler application/x-httpd-php .html ....which works great. However, our local in-office server for testing and viewing our sites is Apache 2.0.55 with PHP 4.4.4 on Windows XP Pro. I have read everything I can find, and have...
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 is valid. The sorts of things that cause problems are unmatched quotes inside the HTML and mismatched <>'s around the HTML. There are probably others (thus demonstrating why I need to avoid parsing it). The mismatched <>'s are not too...
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 keypad. By this the user cannot enter text at anytime. Though validation for symbols can be made later. Can you provide a code snippet for opening only a numeric keypad to enter numbers only for the text box.
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 numeric keypad, I have the form set to always be on top, similar to task manager, but I am uncertain how to have an application active, such as Excel, and be able to click buttons on the form to send values to the active cell in Excel without taking...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.