Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cathing mouseup event while moving the cursor

Status
Not open for further replies.

ozane

Technical User
Feb 3, 2005
57
TR
hi. i am now drawing rectangle over an image. when user mousedown left click and moves to another point i can get the coordinates of the starting point. but i want to get the coordinates of the points where mouseup event occurs at the end of the move... is there a way??


function move(e){
if (navigator.appName=="Microsoft Internet Explorer") {
if (window.event.button==1){
window.status="Create a rectangel on the image..."

document.form1.Text1.value=x0;
document.form1.Text2.value=y0;
//window.alert("jsdhj")
//document.form1.imgMap.onmousemove=move;
}
if (window.event.button==0){
x0=event.clientX
y0=event.clientY
window.status="x="+ x0 + " " +"y="+ y0 + " sss"
return true;

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top