I have a problem with hiding keyboard in the iPhone simulator. My HTML code:
<form id="my_form">
<input type="search" id="searchBar" />
</form>
jQuery code:
$("#my_form").submit(function() {
one = $('#searchBar').val();
console.log(one);
doSearch(one);
return false;
});
Everything works as I need: I can get form value and perform some Ajax. But when the function returns false, the virtual keyboard in the iPhone simulator is still visible. How to hide the keyboard? Is there another method to do that? I need to pass data to the server using Ajax when the user searches and presses 'Go' on the iPhone. The search result should be shown in the same page (already done). The user can again search in the same page.
Please help me.
Thanks,
--regeint
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…