This content has been marked as final.
Show 2 replies
-
1. Re: a4j:commandButton
gizola Oct 30, 2008 4:09 AM (in response to kdcosta)
One solution can be:
you define javascript to the onkeypress event of the input box, and you check what key has been pressed in the input box.
If it was the ENTER key, you call the onclick method of the ajax button.
So you can post it with ENTER or witch clicking on the button. Both will work.
Regards,
Gizola
PS: I'm not a big javascript warrior, so I don't know if you can catch the ENTER key with onkeypress, but try it, maybe onkeyup is better. But the logic should work. -
2. Re: a4j:commandButton
justinmbirch Oct 30, 2008 8:14 AM (in response to kdcosta)See http://bytes.com/forum/thread92476.html
explains how to capture key presses.
Once you have a method to do that, just call document.getElementById( 'yourA4JCommandbutton').click();