Csaba2000 said:
I'm probably just blanking today, but, how can I find
out what type the cursor currently is?
It's hard.
Is document.activeElement.style.cursor the way to go on this?
Not the "style" element, but "currentStyle" in IE will give the
current style of the object. "activeElement"
But that's only for IE, right?
Right. Same for "activeElement". The standard-based method should
work in Mozilla and Opera 7.2, so if we combine the two, we get:
function getCurrentStyle(elem,prop) {
if (elem.currentStyle) {
return elem.currentStyle[prop];
} else {
var cstyle = document.defaultView.getComputedStyle(elem,null);
return cstyle[prop];
}
}
If you can then find the element that the mouse points to (probably inside
a mouse event handler), then you can use the above to find the cursor:
var cursor = getCurrentStyle(elem,"cursor");
What you can use it for is another question. Mozilla and IE reported "auto",
while Opera 7.2 said "default". Neither Mozilla nor IE changed their opinion
just because I hoovered over an element with a ":hover{cursor:text}" rule.
They both said "auto" anyway. Opera 7.2 did say "text".
Good luck.
/L