File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes does <div> have any onBlur method ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "does <div> have any onBlur method ?" Watch "does <div> have any onBlur method ?" New topic

does <div> have any onBlur method ?

mark I thomas
Ranch Hand

Joined: Apr 07, 2008
Posts: 86
when an element is selected, a hidden <div> appears and it contains some warning text. I want that when user moves mouse away from the <div> area or clicks any other area (not inside <div>), the <div> area should disappear again. But I don't think <div> has onBlur type method. How to do this ?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

As a <div> cannot gain focus, it can't lose focus. So, no blur event.

Is mouseout perhaps what you seek?

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: does <div> have any onBlur method ?
It's not a secret anymore!