tags:

views:

138

answers:

2

I know this isn't strictly program related, but I think I've seen this answer on SO before and lost track of it.

The specific question has to do with reading an electronic document. I find it helpful to move the cursor across the words as I'm reading them. This works great with Word documents, but I'm unable to do it with web pages. Is there a way to make a web page see and respond to cursor movement?

A: 

I'm not sure what you actually want to do when the cursor moves, but you can capture mouse movements over an element with said element's onMouseMove event.

Like this:

<div id="a" onMouseMove="doSomething(event.clientX, event.clientY)">
   Mouse over me!
</div>

This will send the current X and Y coordinate to the "doSomething()" function when the mouse is moved over the DIV

ChristianLinnell
A: 

In Firefox, you can do this by going to about:config and modifying the accessibility.browsewithcaret setting. (Type "caret" into the filter field, and right click to change the value of a boolean setting)

davidcl