Chris N
Posts: 0
Joined: Thu Mar 19, 2015 5:18 pm

Submit event for invoking a service?

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!

Bob Fludder
Posts: 0
Joined: Fri Sep 14, 2012 1:09 am

Submit event for invoking a service?

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.

Chris N
Posts: 0
Joined: Thu Mar 19, 2015 5:18 pm

Submit event for invoking a service?

Thanks Bob, I'll give that a go!

Return to “Issues”