[thelist] Javascript: determining if a element has focus?
Mark M
mark at safefrombees.com
Thu May 13 22:34:27 CDT 2004
Hey all,
Not sure if this is possible, but figured I would ask.
I've got my spiffy login form, and when the page loads, I want to point the focus at
the username field.
However - I ***HATE*** it when a page loads slowly, and I'm halfway through typing in
my password, and it shifts my focus back to the username... and suddenly I've typed
half my password in the username field.
So I want to check if the focus is in either the username or password fields, and if
it is, I won't set the focus to the username field.
All that being said - anyway I can check if a field has focus, short of using the
onFocus and onBlur events to set some variables on the page?
(Not too fussed if IE only, as working on a intranet)
TIA
Mark
------------------------------------------------------------------
mark at safefrombees.com
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]
More information about the thelist
mailing list