Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't show iPhone keyboard for a particular textbox in web page? [duplicate]

Is there any setting using which the iPhone keyboard won't appear for a particular textbox in web page? May be some css kind of setting?

like image 291
Ramesh Soni Avatar asked Nov 25 '08 13:11

Ramesh Soni


People also ask

How do you turn off keyboard on iPhone?

To hide it, slide your finger down from above the text-entry box and the keyboard will start to disappear.

What does character preview mean on iPhone?

Another keyboard feature you might not be aware of that can be changed is the functionality that lets you turn off what Apple calls "Character Preview." This is where the character "key" you type enlarges for a second as you type it, popping up on your screen. You can make those pop-ups go away.

How do I get my iPhone keyboard back to normal?

Go to Settings > Accessibility > Keyboards, tap Full Keyboard Access, then turn on Full Keyboard Access.


4 Answers

you just make the input field as readonly="true"/ readonly mode so that keyboard wont appear!!

like image 188
siva Avatar answered Oct 05 '22 23:10

siva


Do you want the text box to be editable for any other browser other than the iPhone? If not, have you attempted to disable the text box? I haven't tried this, nor can I recall seeing a disabled text box on a site with my iPhone; however, it may do it.

If disabling the text box works, but you still only want to restrict it to the iPhone, you'll need to look at the User Agent for the iPhone. You can determine this through server side code or through JavaScript's navigator.userAgent.

To save a bit more time for you as well, the iPhone's user agent is as follows:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b Safari/419.3
like image 33
JamesEggers Avatar answered Oct 05 '22 22:10

JamesEggers


Keep in mind that readonly="true" isn't required.

<input type="text" readonly> is enough.

like image 44
geoyws Avatar answered Oct 05 '22 22:10

geoyws


If you want hide keyboard for iphone/ipad/ipod users you must identify this useragents. I recomend http://wurfl.sourceforge.net/ to find different versions of these devices and then printing readonly="true" disabled="disabled" on inputs.

like image 21
Gustavo Costa De Oliveira Avatar answered Oct 05 '22 22:10

Gustavo Costa De Oliveira