Solved

iPad / iPhone numeric Keyboard

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Change text when typing into field 2 21
Auto Submit on dropdown box 3 35
javascript email link with image 2 17
Asp.net mvc 5 5 16
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s 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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now