Do DIVs have a onblur handler?

L

laredotornado

Hi,

What handler would I set on a particular DIV if a user mouses out of
that DIV or clicks outside of that DIV?

Thanks, - Dave
 
T

Thomas 'PointedEars' Lahn

caglaror said:
I usually try onfocus and onblur if i want to catch clicks out side a
div.

As not all elements can be focused, the `focus' and `blur' events do not
apply to all elements. In fact, per W3C DOM Level 2 Events those events
only apply to LABEL, INPUT, SELECT, TEXTAREA, and BUTTON (that may be
different in other DOMs); HTML 4.01 specifies the `onfocus' and `onblur'
attributes only for A, AREA, BUTTON, INPUT, LABEL, SELECT, and TEXTAREA.
So you would need such an element "out side the div".

I guess that is why the OP asked in the subject whether or not "DIVs have
a onblur handler" ...


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,148
Messages
2,570,838
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top