Page 1 of 1

how to trigger search on 'return' key being pressed

Posted: Tue Jun 02, 2015 1:59 am
by Dandy Ling Kwong

In smartphones, the keypad will usually have a 'Go' or 'Done' button which when being pressed, will complete and trigger the search field of the app. An example when entering address in browser's address bar, we can press 'Go' on the keyboard to continue on.

Is it possible to do this in Appery.io?


how to trigger search on 'return' key being pressed

Posted: Tue Jun 02, 2015 6:44 pm
by Serhii Kulibaba

Hello,

Please use keypress event and check the code:
https://api.jquery.com/keypress/


how to trigger search on 'return' key being pressed

Posted: Sun Aug 16, 2015 11:49 am
by Fellrad

Hello Appery-Team!

I have a similar problem. I impose the following JS-code on the keypress event on an input field.

if(keyCode===13){
Apperyio("ButtonXY").preventDefault();
Apperyio("ButtonXY").click().trigger();
}

It does not work.

Do you have an idea?


how to trigger search on 'return' key being pressed

Posted: Tue Aug 18, 2015 1:13 am
by Dandy Ling Kwong

Hmm..

My code looks like this:

$('#startScreen_mobilesearchbar_21').keypress(function(e) {
if(e.which == 13) {
search_patient_service.execute();
}
});