adf javascript clientlistener not capturing the TAB keypress event
727467Jun 7 2010 — edited Jun 8 2010Hi,
I have client listener attached to a text field to trap the keyPress event. The method is being called for all the key strokes except special keys like TAB, arrow keys, pageup, pagedown etc. Is there any possibility to capture TAB key event.
<af:clientListener method="myFunctionTosetFocus"
type="keyPress"/>
function myFunctionTosetFocus(event) {
alert('function called....')
var keyCodePressed = event.getKeyCode();
if(keyCodePressed == AdfKeyStroke.ENTER_KEY || keyCodePressed == AdfKeyStroke.TAB_KEY) {
alert('Do some thing here....')
}
}
I can see both the alert messages when I click on the ENTER key. But I cannot see both the alert messages when I cick on TAB key. The same is working without any problems in firefox.
Thanks and Regards,
S R Prasad