[eluser]RaiNnTeaRs[/eluser]
I want to combine the javascript mouse event handler and the CI function crop image
the idea is to get create a rectangle inside the image i want to crop.
this is my image
img src="http://192.168.1.188/ci2/paint/1.jpg" id="gfx" style="position:absolute;top:10;left:400;"
onmousedown = "crop(event)" onmouseup="crop2(event)"
>
this is my javascript code,but it doesnt working.
function crop(e)
{
X1 = e.clientX;
Y1 = e.clientY;
}
function crop2(e)
{
X2 = e.clientX;
Y2 = e.clientY;
}