Page 1 of 1

Submit event for invoking a service?

Posted: Thu Mar 19, 2015 5:18 pm
by Chris N

I have a screen in appery which contains a number of different input fields. There is a submit button which invokes a service that maps all these entries and performs the api calls. However, as this screen will be used by users in HTML5 mode as well (non mobile devices), I want to trigger a submit (invoke the service) when someone presses enter on their keyboard after populating a value in the input fields.

I first would have assumed I could do that via jquery submit (http://api.jquery.com/submit/), however, in this case the inputs in appery are not in a form (just the service invoke). Any ideas on how to accomplish this?

Thank you!


Submit event for invoking a service?

Posted: Fri Mar 20, 2015 2:41 am
by Bob Fludder

Use the key up event. Then in the javascript for that event look at the keyCode - something like: if (event.keyCode == 13) { yourservicename.execute({}); }

Not sure if it invokes it. My need to create a service that invokes the one you want to run and use that in the event.

Hope you follow what I mean - maybe someone else has a better idea.


Submit event for invoking a service?

Posted: Mon Mar 23, 2015 5:25 pm
by Chris N

Thanks Bob, I'll give that a go!