Solved

iPad / iPhone numeric Keyboard

Posted on 2014-10-03
5
347 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

820 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