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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I change cursor while dragging?

Status
Not open for further replies.

lovekang

Programmer
Feb 16, 2006
86
KR
I want change the cursor while dragging.
I mean I want it reamain e-resize while dragging

<html>
<head>
<script language="JavaScript">
<!--
var startingPointX;
var startingPointY;
var imgW;
var imgH;
function resizeImage(evt,name){
newX=evt.x
newY=evt.y
eval("document.all."+name+".width=newX-startingPointX+imgW")
eval("document.all."+name+".height=newY-startingPointY+imgH")
}
function setStartingPoint(evt,name){
startingPointX = evt.x;
startingPointY = evt.y;
imgW = eval("document.all."+name+".width")
imgH = eval("document.all."+name+".height")
eval("document.all.x.value=evt.x")
eval("document.all.y.value=evt.y")
}
//-->
</script>
</head>
<body style="margin-left:30px">
<table border="1">
<tr>
<td>
<img height="0" border="0" width="0" src=" name="dummy"/>
<img style="cursor:e-resize" height="20" border="0" width="10" onMouseDown="setStartingPoint(event,'dummy')" ondrag="resizeImage(event,'dummy')" src="<td>,</td>
</tr>
<tr>
<TD>blah1</td><TD>blah1</td>
</tr>
</table>
<input name="x"/>
<input name="y"/>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top