08-06-2011 02:11 PM
Hello All,
I am developing a WebWorks application for PlayBook. I have a page that implements a search feature. At the top of the page is an <input type="search"..> textbox. Next to that is a search button. If the users types search keywords and pressed the button the PlayBook keyboard closes. However if they press the 'return' button on the keyboard it does not close. How can I make the keyboard close when 'return' is pressed?
Thanks!!!
Solved! Go to Solution.
08-06-2011 03:23 PM
A few questions. Does this page have a HTML form tag? If so, on clicking the return key does the page reloads or nothing happens? What is the desired effect after clicking the search button?
The keyboard disappears on clicking the button since the textbox is no longer having focus. If your page has a HTML form tag. Please try the following. I've not tested this but. I've wrote this assuming jquery library is used.
<script type="text/javascript">
function cancelKeyPad() {
$('#search').blur();
return false;
}
</script>
<form action="#" onsubmit="cancelKeyPad();">
<input type="text" id="search" />
</form>
08-08-2011 12:21 PM
Praveen,
This worked like a charm! Thanks so much.