I am new in Firefox OS. I have a search box.
After pressing the submit button it shows results perfectly. But I want to add keyboardevent like press enter button it will show result.
Try this:
$("#SearchText").keydown(function (e) {
var keyCode = e.keyCode || e.which;
if (keyCode == 13) {
//stop CR & do submit here instead
document.forms["myform"].submit();
return false;
}
});
It intercepts every key press in the search text field and checks for Return.