How do I focus an HTML text field on an iPhone (causing the keyboard to come up)?

Posted by Ross on Stack Overflow See other posts from Stack Overflow or by Ross
Published on 2009-06-11T04:21:21Z Indexed on 2010/05/16 16:10 UTC
Read the original article Hit count: 153

Filed under:
|
|

I'm writing an iPhone web app, and I want to automatically focus a text field when the page is loaded, bringing up the keyboard. The usual Javascript:

input.focus();

doesn't seem to be working. Any ideas?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about html