Focus
I am trying to use up/down arrow keys to hightlight rows in a ASP datagrid. I am using the onkeydown to trap the keys. However, I have other controls on the web page, like a drop down box. If user uses arrow keys to select a value in the drop down box, focus goes to data grid and begins highlighting a row there. User can not select the value in the drop down box with this going on. In JavaScript, how do I determine if the user has focused on the DataGrid? Logic I like to find: If the user has focus on another control, allow him/her to use arrow keys. If focused on datagrid only, allow arrow keys for moving up and down rows.
Any suggestions? Thank you,
Paul
|