Joe Joe - 3 years ago 168
Javascript Question

javascript - unfocus a textbox

I have a mobile template with a login form which is ajax / url hash based browsing. If on an iphone a user clicks the "go" button on the iphone keyboard the ajax authenticates / logs them in and then loads the next page inside another div and hides the current login form div.

The problem is, on an iphone the keyboard is still popped up. Is there anyway to unfocus a textbox element via javascript?

Answer Source

Use the blur() method or try setting the focus on another element like a link.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download