This content has been marked as final.
Show 3 replies
-
1. Re: Pressing enter does real submit?
sergeysmirnov Aug 8, 2008 8:19 PM (in response to bkyrlach)One possible way:
1. Capture this event with defining onkeypress attribute
2. Detect that ENTER is pressed.
If so:
3. Invoke Ajax request for this form using a4j:function
4. Return false to avoid non-Ajax request
In general, this question is pretty popular. Search in Google for submit form enter keywords for details -
2. Re: Pressing enter does real submit?
bkyrlach Aug 9, 2008 9:17 AM (in response to bkyrlach)Why define an a4j:function instead of just having it call the a4j:commandButton's click function? I guess I was just a little suprised in general that I have to explicitly click the commandButton to get an ajax request.
-
3. Re: Pressing enter does real submit?
sergeysmirnov Aug 9, 2008 12:07 PM (in response to bkyrlach)You can click a button from javascript if all browser that you have to support allow such call.