Welcome Guest, Not a member yet? Register   Sign In
Javascript and php onmouseevent handler TT part 3 ^^
#1

[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;
}

#2

[eluser]benofsky[/eluser]
Can you try and explain more, I don't understand why you want to crop an image with javascript.
#3

[eluser]RaiNnTeaRs[/eluser]
I want to use the crop function in image_lib libraries.The point is : I want to drag my mouse over my image to create a rectangle over it.The rectangle area will be used for the cropped area.




Theme © iAndrew 2016 - Forum software by © MyBB