Dandy Ling Kwong
Posts: 0
Joined: Sat Jan 10, 2015 9:06 am

how to trigger search on 'return' key being pressed

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?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

how to trigger search on 'return' key being pressed

Hello,

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

Fellrad
Posts: 0
Joined: Wed Oct 15, 2014 9:06 am

how to trigger search on 'return' key being pressed

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?

Dandy Ling Kwong
Posts: 0
Joined: Sat Jan 10, 2015 9:06 am

how to trigger search on 'return' key being pressed

Hmm..

My code looks like this:

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

Return to “Issues”