Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Finding the currently focused object

How do you detect which object in a document has focus?
0
stuartbw
Asked:
stuartbw
1 Solution
 
tekchicCommented:
http://developer.irt.org/script/135.htm

There is nothing inbuilt that will provide this information for you. What you could do is monitor this yourself by declaring a variable which holds the information of the element that has the focus, and then monitoring it using onFocus() and onBlur() event handlers to keep the variable updated.

All form elements except hidden support onFocus(), however on UNIX, Netscape 2 and 3 only support onFocus() for text entry type fields, i.e. text,textarea and fileupload.

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now