Hey guys im creating script. And i need a liltle help. Ive got this mouse position script but when i use the function, it shows about 1000px even if my cursor is in about 200px top. What can i do to fix this and get normal mouse position. Please help.
$s .= ('<td id="start_'.$currentTasken.'" nowrap="nowrap" align="center" ondblclick="editCellValue(this)" style="' . $style . '" title="'.$AppUI->_('Double click to edit date').'">'
<script>
var cursorX;
var cursorY;
document.onmousemove = function(e){
cursorX = e.pageX;
cursorY = e.pageY;
}
function editCellValue(cellElement) {
document.getElementById('cellValueEditorDiv').style.display = 'block';
document.getElementById('cellValueEditorDiv').style.top = cursorX;
document.getElementById('cellValueEditorDiv').style.left = cursorY;
}
</script>