Im developing a mobile site and on my I want the numpad to appear when users get to this field. Is it even possible to make a transform to ipad and android numpad? ..
I have checked with a friend who tells me that my fields are called from a database and they are called as a size field?
Hope anyone can give me some hints
Use:
<input type="number" />
Related
I am working on website where I would like to display the numeric keypad in a text field.
Is it possible to default the numeric keypad once the user starts typing? Currently, the use has to click/touch the numeric symbol to get the numeric keypad.
I would really appreciate.
Thanks in advance.
You can use the <input type="number"> for this. Defaults to type="text" for browsers not supporting it. Read more on MDN
I've been reading about invoking a mobile device's camera and allowing the user to take a picture in HTML5, and I found I can do it using an input element like so:
<input type="file" accept="image/*;capture=camera">
I also read about the getUserMedia() API, but it doesn't seem as though it's supported by Safari very well.
I want to customize the UI that is visible while the user is taking a screenshot. A couple examples of the customization I'd like to perform are overlaying text on the screen and drawing rectangles to show what portion of the screen will be captured. This is already done in native apps, but is it possible in the web?
If not, is there any sort of workaround?
Thanks in advance for any help!
It is not possible on the web (yet).
HTML Media Capture (the code you used) relies on the OS & browser for the camera & library apps.
Also, the code you used is deprecated, here's the correct one: <input type="file" accept="image/*" capture> .
This (new) code will tell the browser 2 things:
accept="image/*" → you want to take a picture (not a video or audio)
capture → only get a picture from the camera (not from the library, works only on Android)
See Correct Syntax for HTML Media Capture for more info.
Can I manually show/hide device keyboard?
My application is behaving strangely if device keyboard is on display and, say, I hit next button then the CSS of jQuery Mobile is getting distorted. I am not getting any javascript or any other error in the console. Any help is appreciated.
I have used one of the suggestions in the following question (the one with 84 up votes...), and it worked well for me: iPad Safari - Make keyboard disappear
Lets assume you have an <input type="text" id="myInput" />.
So in your change page code you can do the following, which will first dismiss the keyboard and then perform the page navigation:
function changeToPage1() {
$("#myInput").blur();
$(':mobile-pagecontainer').pagecontainer('change','page1.html');
}
Tested in iOS Simulator but should work in Android as well.
I use an input field of the type number so the iPad would bring up the numeric keypad automatically.
But when I fill up the field and display it, it shows a thousand point on the iPad, in Chrome it does not.
Is there any way to remove that thousand point ? Using CSS ?
You can use type="tel" instead of type="number"
When running on a touchscreen device (iPhone, in my case, but I presume it does this on others), when the virtual keyboard pops up for a form field, there are added navigation buttons at the top of the keyboard: "previous", "next", "done". (And sometimes "autofill").
This is apparently the Mobile Safari "form assistant".
I find this redundant, superfluous, and confusing. iPhone users aren't used to this in native apps, and it's unnecessary. It's a touch device. You touch what you want to change. There's no need for navigation buttons!
I suppose users may be familiar with this, IF they use their device often to fill forms on websites. I've had an iPhone since the 3G, and never noticed this. I don't think I've ever filled a form on Mobile Safari! (I would use my desktop...)
The form assistant is there for navigating forms on websites, which might not be designed appropriately for a mobile device. So, in that context it serves a useful purpose.
But when using JQuery Mobile, you ARE designing an interface for use on a touchscreen mobile device. There shouldn't be a need for the form assistant. I find it particularly annoying in a local app (PhoneGap, Rhodes, etc.).
I've done some searches, and haven't come up with a solution.
Does anybody know how to turn this off?
sorry, its not possible to remove the Form Assistant inside mobile safari.
There is no solution for mobile Safari, but for PhoneGap there certainly is.
As of 2.6.0 there is an option in the config.xml
<preference name="HideKeyboardFormAccessoryBar" value="true" />
For versions before 2.6.0, or more sophisticated use, there is the KeyboardToolbarRemover, which even allows to dynamically show and hide the keyboardAcessoryView.
In your Javascript, include the module
var toolbar = cordova.require('cordova/plugin/keyboard_toolbar_remover');
To disable the toolbar
toolbar.hide()
To re-enable the toolbar
toolbar.show()