Solved

iPad / iPhone numeric Keyboard

Posted on 2014-10-03
5
344 Views
Last Modified: 2014-10-06
We have a form that has some fields that require numeric input (like a quantity). If that page is being displayed in Safari, is there a way (in HTML or some other web technique) to cause the numeric keyboard to open when the field in question is the focus?
0
Comment
Question by:Richard Korts
  • 3
  • 2
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40360461
Set the input type to number

<input type="number" name="">
0
 

Author Comment

by:Richard Korts
ID: 40360581
To Gary:

I did that & I get the attached (in FireFox). That's not what I want, those up / down arrows do nothing & the field is too wide.

Or do you mean I have to detect the browser & do that ONLY if Safari?

Here is my HTML:
<td width="15%">$<input type="number" size="8" name="prRB15" value="13.00"></td>
                                          <td width="15%"><input type="number" size="4" name="qtRB15" value="2"></td>

Thanks
input-type-number.jpg
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40360609
Add this CSS
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance:textfield;
}

Open in new window

0
 

Author Comment

by:Richard Korts
ID: 40360645
To Gary,

Don't like it, the size property in HTML is ignored, see attached (from Chrome, same in FF), maybe use CSS for "size"?

Thanks
input-type-number-no.jpg
0
 
LVL 58

Expert Comment

by:Gary
ID: 40360649
Shouldn't really be using the size attribute anyway, css will work
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question