I have made this code working but I want to have an alert , so i can see all the cordinate of x1 y1 and x2 and y2, can any one help me, the example is from this site http://odyniec.net/projects/imgareaselect/examples-callback.html#submitting-selection-coordinates-demo i have applied the code but I i dont get the cordinats, I can get the width and height tho. My code is in here http://jsfiddle.net/qzHSe/
I want to have the cordinate as a respond, I know php code will give me something but we are working with struts and java but, besides that I just want to alert the cordinate some how on the screen so I can see it myself first.
Thank you, I am very new to these things
I have cleaned up some of your code and found a typo in the alert of the
selection.x1value (you’ve typedselction.x1, missing ane).http://jsfiddle.net/qzHSe/1/
Also, note that you don’t have to call
$(img).imgAreaSelect()every time you want to add more options. Just use a coma and add it like I’ve done.By calling the function many times, jQuery has to do a look up in the DOM to grab the object for you to use. If you really have to call it many times, consider caching the value of the object in a variable: