gauravg77
10-21-2003, 11:37 AM
Hello,
I need help here.
This is regarding onkeypress function.
I have the followng in my javascript code.
document.captureEvents(EVENT.KEYPRESS)
So my onkeypress function is invoked for all key-strokes while the focus is anywhere in the document.
However I need to differentiate, based on where the focus is. Specially, I need to know if the focus is on an href link.
How can I go about it.
I understand there is a 'target' property of the event. But does the target hsa something like target.type which I can check if its = "href" (for ex)
TIA,
Gaurav
I need help here.
This is regarding onkeypress function.
I have the followng in my javascript code.
document.captureEvents(EVENT.KEYPRESS)
So my onkeypress function is invoked for all key-strokes while the focus is anywhere in the document.
However I need to differentiate, based on where the focus is. Specially, I need to know if the focus is on an href link.
How can I go about it.
I understand there is a 'target' property of the event. But does the target hsa something like target.type which I can check if its = "href" (for ex)
TIA,
Gaurav