Hello,
im attempting to add the ability to resize a table of contents. but i seem to be running into a problem with it. Im using the MOUSEMOVE Event to capture the x posistion of the mouse but i lose the x position as soon as the Drag event begins. does anyone know of a way i can capture the current mouse x when item is dropped or when dragging(to make it a real time view)?
Thanks in advance
MCP, .Net Solutions Development <%_%>
im attempting to add the ability to resize a table of contents. but i seem to be running into a problem with it. Im using the MOUSEMOVE Event to capture the x posistion of the mouse but i lose the x position as soon as the Drag event begins. does anyone know of a way i can capture the current mouse x when item is dropped or when dragging(to make it a real time view)?
Code:
<script type="text/javascript">
function ResizeTOC(x1)
{
{
toc.style.width = x1;
appliedx.innerText = x1;
}
}
window.onload = init;
function init() {
if (window.Event) {
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = getXY;
}
function getXY(e) {
x = (window.Event) ? e.pageX : event.clientX;
y = (window.Event) ? e.pageY : event.clientY;
currentx.innerText = x
}
</script>
Cur:<span id="currentx"></span><br/>
App:<span id="appliedx"></span><br/>
<span style="width:50px; border:medium; background-color:gray; display:block;" id="toc"
ondragend="ResizeTOC(x)"
Thanks in advance
MCP, .Net Solutions Development <%_%>