hide keyboard in iphone safari webapp

Posted by munchybunch on Stack Overflow See other posts from Stack Overflow or by munchybunch
Published on 2010-05-23T00:00:32Z Indexed on 2010/05/23 0:00 UTC
Read the original article Hit count: 649

Filed under:
|
|
|

I'm creating a webapp for the iPhone, based in HTML/CSS/JS. I'm using forms to receive input and pass data to the script, but a problem I'm encountering is that the keyboard won't disappear. The user will enter the information, hit submit, and since it's JavaScript the page doesn't reload. The keyboard remains in place, which is a nuisance and adds another step for users (having to close it).

Is there any way to force the keyboard in Safari to go away? Essentially, I have a feeling this question is equivalent to asking how I can force an input box to lose focus or to blur. Looking online, I find plenty of examples to detect the blur event, but none to force this event to occur.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about keyboard