IPhone WebApp Specific Keyboard for Float-numbers - iphone

Im working on a small WebApp for my iPhone.
I got a form with some input-fields for text, numbers and float-numbers.
Until now i used the normal qerty-layout but i know that special apps can use specific keyboard-layouts for input-fields.
I already found out how to get a normal 0-9-keyboard, but i need the "," or "." for float-numbers.
So my question: is it possible to display the a 0-9-layout including the "," or the "."
Greets :)

Supported Input Values
<input type="number" >
Displays 0-9 in the top row and punctuation below for me in iOS 5.

Related

TextInputType.datetime is not showing '/' & ':' symbols

As in image symbol / & : is not present.
While everything else and code is fine and is also working on my another device.
Are you using the same keyboard on the other device (the one which is working)?
I can say based on my expirience that some keyboards do not responde to de input type and they just show a default or numeric keyboard.
For example on devices using SwiftKey, when keyboard is set to only numeric it doesn't change anything, just shows de default keyboard.

How to change the text of select & cancel command in lwuit

Hi I am developing mobile apps using Lwuit 1.5
my app contains 3 language so I am doing a localization and I'm using the next code for localization:
(String) local.get("any text ")
& it work just fine with any component
but the problem is that it doesn't work with the select & cancel softbutton
I tried to use .setSelectCommandText but it also doesn't work
So could anybody help me on how to change the select & cancel text
& Thank you very much in advance
Use the strings "select" and "cancel" lower case with the setResourceBundle() method of the UIManager.

HTML5 - Open numeric keyboard iPhone [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
HTML5 Form Input Pattern Currency Format
Is there a way to open the numeric keyboard using input type="text"? I know type="number" will open the numeric keyboard, but it won't take money values. For instance, if you input 1.00, it turns into 1 on an iOS product. Also, this only happens on iOS devices. It works fine on Android, and all web browsers.
I've tried playing around with patterns and patterns="[1-9]*" opens the phone number pad. Is there possibly one that will open the numeric keyboard?
try using this, which should open the numeric keyboard in iOS (and also open the number input keyboard in Android):
<input type="number" step="0.01">
To answer:
Yes nput type="text" exists in html5 http://www.w3schools.com/html/html5_form_input_types.asp
type="number" can be formatted to two decimal places using jquery .toFixed(2) http://www.w3schools.com/jsref/jsref_tofixed.asp
jquery mobile is not your language of choice but it does customize the keyboard for some inputs, e.g. date You might want to try it, it's very similar to html http://jquerymobile.com/

How to disable automatic date-linking on iPhone?

I'm currently developing an RWD site, and while testing on the iPhone4 I see that plain dates are "seen" as phone-numbers - hence clickable. I do not want that.
This is a Norwegian site with dates written in format: DD.MM.YYYY (8 numbers).
Norwegian phone-numbers also contain 8 numbers.
For instance: The date 23.11.2011 (23rd November 2011). On pc and android, this is given the correct CSS for dates, but the iPhone shows these as "links". When clicked the iphone (iOS) prompts me with a call dialog box "23 11 20 11 - Call or Cancel ". Why?
The really weird thing is, that this is not consistent. Take this code for example:
<span class="pubDate">(Published: 24.10.2011, Last changed: 02.12.2011)</span>
On my iPhone, only the last-changed-date is clickable, not the first one.
Does anyone know of a way to make these unclickable for iPhone?
The easiest, and most thorough way, is to simply use the meta tag:
<meta name="format-detection" content="telephone=no">
This prevents iOS from parsing numbers and converting assumed-numbers into clickable/callable numbers.
If, on the other hand, you want to prevent numbers being styled as links, you can use the following CSS selectors to target those links that start with the tel: protocol:
a[href^=tel] {
/* stlyes links that start with the 'tel' protocol */
}
Reference:
Apple-specific meta tags.

How to disable phone number linking in Mobile Safari?

Safari on iPhone automatically creates links for strings of digits that appear to the telephone numbers. I am writing a web page containing an IP address, and Safari is turning that into a phone number link. Is it possible to disable this behavior for a whole page or an element on a page?
This seems to be the right thing to do, according to the Safari HTML Reference:
<meta name="format-detection" content="telephone=no">
If you disable this but still want telephone links, you can still use the "tel" URI scheme.
Here is the relevant page at Apple's Developer Library.
I use a zero-width joiner ‍
Just put that somewhere in the phone number and it works for me. Tested in BrowserStack (and Litmus for emails).
To disable the phone parsing appearance for specific elements, this CSS seems to do the trick:
.element { pointer-events: none; }
.element > a { text-decoration:none; color:inherit; }
The first rule disables the click, the second takes care of the styling.
Add this, I think it is what you're looking for:
<meta name = "format-detection" content = "telephone=no">
I was having the same problem. I found a property on the UIWebView that allows you to turn off the data detectors.
self.webView.dataDetectorTypes = UIDataDetectorTypeNone;
Solution for Webview!
For PhoneGap-iPhone / PhoneGap-iOS applications, you can disable telephone number detection by adding the following to your project’s application delegate:
// ...
- (void)webViewDidStartLoad:(UIWebView *)theWebView
{
// disable telephone detection, basically <meta name="format-detection" content="telephone=no" />
theWebView.dataDetectorTypes = UIDataDetectorTypeAll ^ UIDataDetectorTypePhoneNumber;
return [ super webViewDidStartLoad:theWebView ];
}
// ...
source: Disable Telephone Detection in PhoneGap-iOS.
To disable phone number detection on part of a page, wrap the affected text in an anchor tag with href="#". If you do this, mobile Safari and UIWebView should leave it alone.
1234567
You can also use the <a> label with javascript: void(0) as href value. Example as follow:+44 456 77 89 87
Think I've found a solution: put the number inside a <label> element. Haven't tried any other tags, but <div> left it active on the home screen, even with the telephone=no attribute.
It seems obvious from earlier comments that the meta tag did work, but for some reason has broken under the later versions of iOS, at least under some conditions. I am running 4.0.1.
My experience is the same as some others mentioned. The meta tag...
<meta name = "format-detection" content = "telephone=no">
...works when the website is running in Mobile Safari (i.e., with chrome) but stops working when run as a webapp (i.e., is saved to home screen and runs without chrome).
My less-than-ideal solution is to insert the values into input fields...
<input type="text" readonly="readonly" style="border:none;" value="3105551212">
It's less than ideal because, despite the border being set to none, iOS renders a multi-pixel gray bar above the field. But, it's better than seeing the number as a link.
I had an ABN (Australian Business Number) that iPad Safari insisted on turning into a phone number link. None of the suggestions helped. My solution was to put img tags between the numbers.
ABN 98<img class="PreventSafariFromTurningIntoLink" /> 009<img /> 675<img /> 709
The class exists only to document what the img tags are for.
Works on iPad 1 (4.3.1) and iPad 2 (4.3.3).
I have tested this myself and found that it works although it is certainly not an elegant solution. Inserting an empty span in the phone number will prevent the data detectors from turning it into a link.
(604) 555<span></span> -4321
I had the same problem, but on an iPad web app.
Unfortunately, neither...
<meta name = "format-detection" content = "telephone=no">
nor ...
0 = 0
9 = 9
... worked.
But, here's three ugly hacks:
replacing the number "0" with the letter "O"
replacing the number "1" with the letter "l"
insert a meaningless span: e.g., 555.5<span>5</span>5.5555
Depending on the font you use, the first two are barely noticeable. The latter obviously involves superfluous code, but is invisible to the user.
Kludgy hacks for sure, and probably not viable if you're generating your code dynamically from data, or if you can't pollute your data this way.
But, sufficient in a pinch.
A trick I use that works on more than just Mobile Safari is to use HTML escape codes and a little mark-up in the phone number. This makes it more difficult for the browser to "identify" a phone number, i.e.
Phone: 1-800<span>-</span>620<span>-</span>3803
Why would you want to remove the linking, it makes it very user friendly to have th eoption.
If you simply want to remove the auto editing, but keep the link working just add this into your CSS...
a[href^=tel] {
color: inherit;
text-decoration:inherit;
}
<meta name = "format-detection" content = "telephone=no"> does not work for emails: if the HTML you are preparing is for an email, the metatag will be ignored.
If what you are targeting are emails, here's yet another ugly-but-works solution for ya'll:
Example of some HTML you want to avoid being linked or auto formatted:
will cease operations <span class='ios-avoid-format'>on June 1,
2012</span><span></span>.
And the CSS that will make the magic happen:
#media only screen and (device-width: 768px) and (orientation:portrait){
span.ios-date{display:none;}
span.ios-date + span:after{content:"on June 1, 2012";}
}
The drawback: you may need a media query for each of the ipad/iphone portrait/landscape combos
You could try encoding them as HTML entities:
0 = 0
9 = 9
Same problem in Sencha Touch app solved with meta tag (<meta name="format-detection" content="telephone=no">) in index.html of app.
This answer trumps everything as of 6-13-2012:
<a href="#" style="color: #666666;
text-decoration: none;
pointer-events: none;">
Boca Raton, FL 33487
</a>
Change the color to whatever matches your text, text decoration removes the underline, pointer events stops it from being viewed like a link in a browser (pointer doesn't change to a hand)
This is perfect for HTML emails on ios and browser.
I too have this problem: Safari and other mobile browsers transform the VAT IDs into phone numbers. So I want a clean method to avoid it on a single element, not the whole page (or site).
I'm sharing a possible solution I found, it is suboptimal but still it is pretty viable: I put, inside the number I don't want to become a tel: link, the ⁠ HTML entity which is the Word-Joiner invisible character. I tried to stay more semantic (well, at least a sort of) by putting this char in some meaning spot, e.g. for the VAT ID I chose to put it between the different groups of digit according to its format so for an Italian VAT I wrote: 0613605⁠048⁠8 which renders in 0613605⁠048⁠8 and it is not transformed in a telephone number.
Another option is to replace the hyphens in your phone number by the character ‑ (U+2011 'Unicode Non-Breaking Hyphen')
I was really confused by this for a while but finally figured it out. We made updates to our site and had some numbers converting to a link and some weren't. Turns out that numbers won't be converted to a link if they're in a <fieldset>. Obviously not the right solution for most circumstances, but in some it will be the right one.
Break the number down into separate blocks of text
301 <div style="display:inline-block">441</div> 3909
Adding the meta tag to turn off format detection did not work for me. I was trying to display a zoom meeting ID in a <p> tag along with other text and iOS was turning that ID into a tel link. Additionally, I was targeting tel links via a[href^="tel:"] in order to give them custom styling so disabling the styles on tel links was not an option.
The solution I found was to wrap the ID number in a <code> tag. This seems to prevent iOS from messing with it.