eo_GetEventPos Function

Gets the cursor position in page coordinates from the provided DOM event object.

Syntax
JavaScript
 function eo_GetEventPos(e)

Parameters

e
The DOM event object.

Return Value

This function returns an object with two members, x and y that represent the X and Y positions.

Remarks

An element's position in window coordinates changes when the browser window scrolls because window coordinates is adjusted by the scroll offset. An element's position in page coordinates does not change when the browser window scrolls.

See Also